int main(){
int card[],number; //MY Question is about this line .
cout<<"Number =";
cin>>number;
for(int a=1;a<=number;a++){
card[a]=a;
cout<<card[a]<<endl;}
return 0;
}
I dont know the size of card[] array because user decides it .
what should ı do ?
I need the answer for an other code . So ı cant write "int card[number]" under the cin line.
PLEASE USE CODE TAGS (the <> formatting button) when posting code. http://v2.cplusplus.com/articles/jEywvCM9/
It makes it easier to read your code and it also makes it easier to respond to your post.
Hint: You can edit your previous post, highlight you code and press the <> formatting button.