S
solartimba
/* The cout<<name<<endl; statement outputs the string "name"
of the previous input. Whats is wrong. */
/* pc MS c++ 5.0*/
#include <string>
#include <iostream>
using namespace std;
int main()
{
string name;
name =" as";
while (!(name.empty()))
{
cout<<" enter name : "<<endl;
getline(cin,name);
cout<<name<<endl;
}
cout<<"ok "<< name<<endl;
return (0);
}
of the previous input. Whats is wrong. */
/* pc MS c++ 5.0*/
#include <string>
#include <iostream>
using namespace std;
int main()
{
string name;
name =" as";
while (!(name.empty()))
{
cout<<" enter name : "<<endl;
getline(cin,name);
cout<<name<<endl;
}
cout<<"ok "<< name<<endl;
return (0);
}