queenie680
Programmer
I'm a beginner at C++, but I am writing a program that has an Char array of names like this char[3][16] = {"Stevens,Cory", "Smith,Will", "Cool,Joe"} I wanted my program to search for a name like this:
char name[16];
cout << "Search for a name" << endl;
cin >> name;
//loop statement
if (char[count] = name) //this is where I have the problem the names don't match for some reason can anyone help?
{
//update statement
}
Also when I update the name i wrote this:
char[count] = newName; //this gives my an error too. can anyone help on this?
I would really appreciate any help. Thanks!!!!
char name[16];
cout << "Search for a name" << endl;
cin >> name;
//loop statement
if (char[count] = name) //this is where I have the problem the names don't match for some reason can anyone help?
{
//update statement
}
Also when I update the name i wrote this:
char[count] = newName; //this gives my an error too. can anyone help on this?
I would really appreciate any help. Thanks!!!!