Home > Back-end >  C language structure variable references
C language structure variable references

Time:11-17


How to reference and assignment of structure member, output operations?

CodePudding user response:

First of all, the structure object if you don't initialize when defining variables, behind only one assignment, you above defines the STD for variables directly, so the assignment operation is only for example: STD. The name [0]='a' in this way, and an array is a truth,
If you want to assign simple point, student STD={" 123 ", the 'a', {1, 2, 3}... }; This is ok

CodePudding user response:

System at the STD variable to change a name, a man named STD namespace, and your STD variable name repetition

CodePudding user response:

Positive solution to the second floor, STD namespace is a c + + standard library, solution: either change the STD to any other name, or change the source of suffix CPP to. C

CodePudding user response:

reference whut_lcy reply: 3/f
positive solution to the second floor, STD namespace is a c + + standard library, solution: either change the STD to any other name, or change the source of suffix CPP to. C

  thank you!

CodePudding user response:

refer to the second floor qybao response:
change the STD variable name, a man named STD system namespace, and your STD variable name repetition

Thank you

CodePudding user response:

   thank you
  • Related