Word arrays

I did c and c++ years ago in school, and then moved on. I recentaly decided to get back into visual c++ and ive been runnign along smooth until I started trying to load an array with words.

My over all goal is to generate a random number between 1-10 then pull a word from an array with the subscript of the rand number.

This is what I thought I needed to do

1
2
3
4
string randomwords[10] ={"Hello","Good Bye","See Ya","Help","Smile","Frown",":)",":(","Love","Heart"};
...
...
cout<<randomwords[randomnumber];


Any ideas or help you could point me to would be much appreciated.
Never mind I found the problem. Did not know I needed to #include <string>
Topic archived. No new replies allowed.