Hello again, I have two questions today. If I write:
typedef char Name[30];
Name king[10];
then king means 10 arrays of 30 chars (Name). How can I write a single char from king? And how can I get the king directly (in the code) not from the input?
cin.getline(king[0], 30);//I've got king from the unformatted input
king[0]="Kenneth";//This doesn't work
I want to write on the screen just the first letter from the king's name. Greetings, Franjo
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello again, I have two questions today. If I write:
typedef char Name[30];
Name king[10];
then king means 10 arrays of 30 chars (Name). How can I write a single char from king? And how can I get the king directly (in the code) not from the input?
cin.getline(king[0], 30);//I've got king from the unformatted input
king[0]="Kenneth";//This doesn't work
I want to write on the screen just the first letter from the king's name. Greetings, Franjo
king[0][0] refers to the first name's first character =)
Kip