How do i create an array and use it to display specific data?
So i've been working on a code that would show top5 international news headlines of each month of this year. So i created an array as of following : String news [ ]= { 1, 2, 3, 4, 5} ; And another string like this String month; What i wanted to do is, use "if loop" for this. As the user would write january, the data would be stored to string month with this code cin>> month; , and if month==news [0] then it would show the headlines from that month which i'd write like this : cout<< news [0]<<endl; But the error occurs at the very beginning of the string news[ ], with 5 lines of saying "error: '1'/ '2'/ '3' was not declared in this scope" What did i do wrong, and how can i fix it. And if there is any other way to write this program with c++, i'd be glad to get suggestions as well.