>1. what syntax should i use to insert character that allows 'space'?
cin.getline:
cin.getline ( emp->name, 50 );
>2. is there a syntax that can 'search' name within a list,,, what is it?
It's called a loop:
node *it = strtPtr;
while ( it != 0 ) {
if ( strcmp ( it->name, key ) == 0 )
break;
it = it->nxt;
}
if ( it != 0 )
cout<<"Found '"<< it->name <<"'\n";
And if I may be so bold, is there a shortage of vowels on your system? nxt and strtPtr are exceptionally annoying to type and read.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
Traicey, that's all well and good, if the OP's compiler supports the string class, which it may not as shown by the use of the pre-standard iostream.h header.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401