skip to main | skip to sidebar

oOzone

Thoughts on Computers, Programming and OO Design.

Tuesday, August 09, 2005

Behaviour of typeid

code snippet to illustrate behaviour of typeid

struct
{
int side;
}square1;

struct
{
int side;
}square2;


int main(int argc, char *argv[])
{
if(typeid(square1)==typeid(square2))
printf("Same.");
else
printf("Different.");
}
Posted by sonofdelphi at 7:08 PM

No comments:

Post a Comment

Newer Post Home
Subscribe to: Post Comments (Atom)

Useful links

  • Selective Ignorance - Koenig
  • Herb Sutter - GoTW
  • John Vlissides - Publications
  • Techno's Scratchpad
  • Grady Booch - Architecture

Cubblogs - My other blogs

  • Cubbspace - Literary blog
  • Oraclique - Quizzing blog
  • Incubbator - Personal blog

Blog Archive

  • ►  2010 (6)
    • ►  June (1)
    • ►  May (1)
    • ►  February (2)
    • ►  January (2)
  • ►  2009 (5)
    • ►  December (1)
    • ►  September (1)
    • ►  June (1)
    • ►  May (1)
    • ►  January (1)
  • ►  2008 (4)
    • ►  December (1)
    • ►  November (1)
    • ►  July (1)
    • ►  January (1)
  • ►  2007 (16)
    • ►  December (3)
    • ►  November (1)
    • ►  October (1)
    • ►  September (1)
    • ►  August (6)
    • ►  July (2)
    • ►  June (1)
    • ►  April (1)
  • ►  2006 (18)
    • ►  December (1)
    • ►  November (2)
    • ►  October (2)
    • ►  September (1)
    • ►  June (1)
    • ►  May (2)
    • ►  April (1)
    • ►  March (3)
    • ►  February (3)
    • ►  January (2)
  • ▼  2005 (21)
    • ►  December (3)
    • ►  November (8)
    • ►  October (4)
    • ►  September (2)
    • ▼  August (4)
      • Copy-Paste and x-Handedness
      • Dream Word
      • Heron - Born Flightless?
      • Behaviour of typeid

Contributors

  • Sonof
  • sonofdelphi