•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 392,050 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,333 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser:
Views: 2789 | Replies: 2
![]() |
•
•
Join Date: Oct 2004
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
How can i declare an array with variable size? i dont want it to be dynamic array, it have to be static. I mean the following:
the previous code when compiled gives me that a constant expression required for the array declaration, although an integer value is already assigned to "size" by "cin" ...
So is there a solution so i can modify the previous code so it'll work?? (without using a dynamic array)..
Appreciated..
int size; cin>>size; float array[size];
So is there a solution so i can modify the previous code so it'll work?? (without using a dynamic array)..
Appreciated..
Last edited by alc6379 : Nov 3rd, 2004 at 9:34 am. Reason: added [code] tags
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb C++ Marketplace
- array/funtion problem, please help (C++)
- Array Index Problem in Quick Sort (C#)
- i have problem with array plz help (Java)
- array declaration explanation needed (C)
- Array with names (C)
- Large Array Problem (PHP)
Other Threads in the C++ Forum
- Previous Thread: LiveUpdates app with Visual C++ 6.0
- Next Thread: Executing a C++ program in another


Linear Mode