C Language Error: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘=’ token

I haven’t used C for a long time. When I brush questions with C, I encounter this error.. I’ve been looking for punctuation errors… Finally, I found that it was caused by initializing data in the structure!

Note: variables in C structure must not be initialized! Assign values like lines 10 and 11.

C + + can be initialized when declared in a class after the C + + 11 standard.

Similar Posts: