I am trying to program a simple function that will sort out an array of names alphabeticaly . The above doesnt work . What i want to be able to do is store the 1st letter of both the names Mark and Nikki into separate chars then compare them . I have experimented a fair bit but i cant seem to get the ()'s and * in the right place .Code:char* names[] = { {"Mark"}, {"Nikki"} }; char letter = *names[0]; char letter2 = *names[1]; cout << letter << endl; cout << letter2 << endl;
Any one get me?