View Single Post
  #1 (permalink)  
Old December 29th, 2007, 04:13 PM
goscho goscho is offline
Registered User
 
Join Date: Dec 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default pointer to struct

Please help me!
I have the problem of rare using of c language.

in deklaration part i have defined a struct:
define NBR = 10;
typedef struct {char *name; int nr} Testtype;

in main programm i will point to Testtype (and this should be an array of NBR, but this is my problem). i did:
Testtype t_type = {"sdfsdf", 10};
Testtype *test_type = t_type;

So far so good, but who i could predefine my other (up to NBR) structs?,
thanks for helping, go.


go
Reply With Quote