1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
#include <iostream>
#include <string>
#include <cstring>
using namespace std;
int main()
{
string names[5]={"Marsh, alan", "turtle, tami", "booby, google",
"turner, ted", "rodgers, mimi"};
int ages [5]={10,20,30,40,50};
string * strPtr[5];
if(strcmp(names[0], names[1]) < 0)
cout << "name 0 is first " << endl;
return 0;
}
|