the use of strings
#include <iostream> using namespace std; int main( ) { char szmode1[4], // car szmode2[6]; // plane static char szmode3[5] = "ship"; // ship szmode1[0] = 'c'; szmode1[1] = 'a'; szmode1[2] = 'r'; szmode1[3] = '\0'; cout << "\n\n\tPlease enter the mode > plane "; cin >> szmode2; cout << szmode1 << "\n"; cout << szmode2 << "\n"; cout << szmode3 << "\n"; return(0); }