Can anyone help with the following problem?<br>
<br>
The code works well up to line 3, after which the program jumps out and ends without letting me enter a <br>
number<br>
<br>
void main(void)<br>
{<br>
<br>
char cNameToAdd[15];<br>
char cNumToAdd[15];<br>
<br>
1. cout << "Please Enter A Name: \n" ;<br>
2. cin.get(cNameToAdd, 15);<br>
3. cout << cNameToAdd << endl;<br>
4. cout << "Please Enter A Number: " << endl;<br>
5. cin.get(cNumToAdd, 15);<br>
6. cout << cNumToAdd << endl;<br>
7. cout << cNumToAdd << cNameToAdd << endl;<br>
}<br>
<br>
Any help will be much appreciated.<br>
<br>
Paul welding.<br>
<br>
<br>
<br>
<br>
The code works well up to line 3, after which the program jumps out and ends without letting me enter a <br>
number<br>
<br>
void main(void)<br>
{<br>
<br>
char cNameToAdd[15];<br>
char cNumToAdd[15];<br>
<br>
1. cout << "Please Enter A Name: \n" ;<br>
2. cin.get(cNameToAdd, 15);<br>
3. cout << cNameToAdd << endl;<br>
4. cout << "Please Enter A Number: " << endl;<br>
5. cin.get(cNumToAdd, 15);<br>
6. cout << cNumToAdd << endl;<br>
7. cout << cNumToAdd << cNameToAdd << endl;<br>
}<br>
<br>
Any help will be much appreciated.<br>
<br>
Paul welding.<br>
<br>
<br>
<br>