What is type struct ?
Type variable // we change the type
type struct ?Code:type integer int x // x store integer value x = 12
type charactr char y // y store charactr value y = 'K'
type float float z // z store floating value z = 11.09
Printable View
What is type struct ?
Type variable // we change the type
type struct ?Code:type integer int x // x store integer value x = 12
type charactr char y // y store charactr value y = 'K'
type float float z // z store floating value z = 11.09
A struct type is a type that can be used to group objects of various types together into a single object.
You can find such examples in any good introductory C textbook.
Nonetheless, here is an example:
Then using the notation you used in post #1:Code:struct X
{
int a;
float b;
};
Code:type struct X struct X w // w store integer value w.a = 12 and floating value w.b = 11.09
The pointer is named v.Quote:
Originally Posted by Player777
C programmers often loosely use the word "struct" or "structure" to mean an object of struct type. In your example, there is no such object. struct X refers to the type, not the object.Quote:
Originally Posted by Player777
What material are you using to learn C?
If you're having difficulty understanding K&R, then put it aside for now and reach for a beginner's introductory book rather than an experienced programmer's introductory book.Quote:
Originally Posted by Player777
What does the term "structure object" mean to you?Quote:
Originally Posted by Player777