-
structure declaration
Hello All,
Want to make typedef concept clear by implementing following
Code:
typedef node
{
int a;
int b;
};
typedef tot
{
struct node theNode[32]; // <-- Is there any memory allocated for this???
};
struct tot theTot;
First two typedef strcture declartion do not allocate any memory at all. But last structure declaration will allocate total 256 bytes of memory( considering 4 bytes for int)
Let me know, whether my above statement is correct.
-
You're trying to typedef a struct? well, try something like this
Code:
typedef struct {
int blah, bleh;
char *str, ch;
} idea;
idea id[60];
http://www.cs.caltech.edu/~petrovic/...ypothello.html