Home > Back-end >  C language dynamically define array space error?
C language dynamically define array space error?

Time:10-21

I space defines a dynamic array and then an error for bosses to help solve once,

CodePudding user response:

Dynamic definition is what operation?
If you want to use a dynamic, or malloc comparison on
Send the source code, let you see if you want to do

CodePudding user response:

The
reference 1 floor? Victor.?? Response:
dynamic definition is what operation?
If you want to use a dynamic, or malloc comparison on
Send the source code, let you see if you want to do
because I am a c language of the new, watching the video tutorial, I according to his method of dynamic define an array and then error

CodePudding user response:

CodePudding user response:

https://blog.csdn.net/dreamiond/article/details/73181115? Depth_1 - utm_source=distribute. Pc_relevant. None - task& Utm_source=distribute. Pc_relevant. None - task

Cannot use variables to define the array size, this kind of situation you define a large enough array directly, similar int arr [200]. This,

CodePudding user response:

This seems to be added in the C99, does not support again in the C11,
You for c99 ide c standard for a try,

CodePudding user response:

Looks v
V does not support C99
Can't use VLA

CodePudding user response:

In addition if support VLA
Your code is cross-border operation

CodePudding user response:

C language does not support the variable length arrays, so suggest using malloc/free application dynamic array,

CodePudding user response:

reference 4 floor xdn1ce response:
https://blog.csdn.net/dreamiond/article/details/73181115? Depth_1 - utm_source=distribute. Pc_relevant. None - task& Utm_source=distribute. Pc_relevant. None - task

Cannot use variables to define the array size, this kind of situation you define a large enough array directly, similar int arr [200]. This,
thank you very much, see

CodePudding user response:

reference 5 floor m0_46108109 reply:
this seems to be added in the C99, does not support again in the C11,
You transfer the c standard ide for c99 try,
ok, thank you, after I watched the video tutorial is an error, now I see

CodePudding user response:

refer to 6th floor lin5161678 response:
looks vs
V does not support C99
Can't use VLA
uh-huh, I understand
  • Related