I'm new to c++ programming and I don't understand array coding. I'm not familiar with placing words into arrays.
It might be better to ask on /g/ if you haven't, but what don't you understand exactly?
Post your current progress if you want the good kind of help - as opposed to someone doing it all for you. To declare a string array, just do
string colors[5]
and then directly insert each string as it's provided to you.
void man()
int size, i, arr[Max]
int*ptr;
ptr = &arr[0]
cout<<"Enter size of array";
scanf("%d",&size)
ans that's all so far. The next step for me is to enter the different strings. I don't know how to store words in arrays. I have only done numbers.
>>371948
It's obviously a typo on "main()"
>>372114
The void part is the issue.
>>372124
It's obviously being called from a framework.
Even if it's not, void casts to int.
>>372130
Nice assumptions bro
>>371948
Fixed my problem
It works. The only thing left to do is to limit the amount of colors I can enter
>>372428
For that you'd simply do a check after line 17. If the number is greater than 10000, just set amount to 10000 and possibly alert the user of this via cout. But if this is being tested automatically, maybe they just want to enter 10001 and see only 10000 entries, in which case just silently cap the amount.
>>372524
>silently cap the amount
What?
>>372553
Don't print out anything to the user about it.
>>372568
It's ok now.I got my program to work.
I used your first option.
I re set the amount to zero every time the number is greater than 1000 and give an error message