Click here to Skip to main content
16,019,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I read
C Structures
in geeksforgeeks,
there is a struct declaration
struct point { int x, y; };

I wonder where is this form decalaration from? C99?
anyone know the description of this form declaration?

Thanks

What I have tried:

the standard about C struct declaration
Posted

Your example matches the description of C structures as explained in chapter 6 of "The C Programming Language" by Kernighan and Ritchie, published in 1978.

:)
 
Share this answer
 
It is sometimes called a single-line declaration because all of the data is on a single line.
 
Share this answer
 
for better readability I recommend to write it in multiline code.
C++
struct point { 
    int x;
    int y;
 };


for further details see C++ reference. At the end there are some hints to versions of the language-
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900