|
-
Mar 7th, 2002, 10:26 AM
#1
Thread Starter
Addicted Member
C++ Help!
hello, im a c++ newbie and i want to write this code,
it looks as it should work but errors appear because
im declaring arrays with variables instead of real numbers
check it out:
#include<iostream.h>
void main()
{
int x;
cout<<"Enter a number for x:";
cin>>x;
int ary[x]; // the error is here
}
is there anyway i could make this work?
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
|