+ 1

Struct type name be the same as what its called?

Can a struct be like this: struct object { int var; }object; I wont have issues with calling the struct? Can I just g ahead and use object.var?

1st Feb 2018, 1:55 PM
Jerome Ariola
2 Answers
+ 1
yes this is a write way to create structure objects. another way to create objects is: struct object obj; obj. var=10; like this you can create multiple struct object in your program.
2nd Feb 2018, 3:35 PM
Harsh Namdev
Harsh Namdev - avatar
0
Thanks you!
3rd Feb 2018, 12:16 AM
Jerome Ariola