You can also use the string class. To use it, include string to your cpp fileCode:char array[5][80]; /*Declares an array that has 5 elements. Each of the element has 80 elements. The first dimension represents the 5 words and the second dimension represents the maximum length of each words.*/ for(int i=0; i<5; i++) { std::cout << array[i] << "\t"; }//Prints the 5 words.




Reply With Quote
