|
-
February 19th, 2003, 12:56 AM
#1
const int and delcaration of an array
I'm writing a program and it has to do with an array. I have to let the user decide the size of the array,but when I code this,
int combined;
cin >> combined;
const int SIZE= combined;
int array[SIZE];
the compiler gives me an error. I also tried this
const int SIZE;
cin >> SIZE;
int array[SIZE];
How can I declare and array of a size decided by the user?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|