4
Contributors
6
Replies
7
Views
6 Years
Discussion Span
Last Post by alaa sam
0

thanks for your answer but can you show me in code how to do it?

1

You first. Otherwise it looks too much like you're asking someone else to do your homework for you.

0
#include <iostream>

using namespace std;

int main()
{
string h;
double res;


string names[1] = {h};


cout << " Enter 1 to start or 0 to stop." << endl;
cin >> res;

while(res == 1);
{

}
cout << " Please enter name: " << endl;
cin >> h;
}

cout << "Names " << endl << h << endl;
    }
}

heres what i made, i keep on getting a error form it and it wont compile.

0

hi
first when you need to use a string to need to include string library

#include<string>

also
you're getting error because you're using curly brackets in a wrong way delete some and you won't have errors

delete the ones in line 20 & 26

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.