the project ask the user to enter a string and then prompts the user to enter a character. the program should display the location of the first occurrence of the character in the string.
for example: the user enters the string "abcde", and the character "d", the program should say the character d is character number 4 in the string.
okay i got it to count the number of characters but i have no idea how to locate the second character and display the location, if anybody can guide me to the proper way of coding , i would greatly appreciate it.
char* ch_ptr = line;
char* ch_ftr = fat;
int count = 0;
cout << "\nEnter a string of characters:\n\n";
cout << "\nEnter one character in the previous string\n\n ";
while (*ch_ptr == 'fat')
cout << "\nThe string you entered is in the " << count << "space .";