Why do I have to press the carriage return twice here? Specifically after line 10?
edit:
I have to press the enter key/return twice before the for loop aft line 10 will execute.
Not sure if this is my ide or not?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#include <iostream>
usingnamespace std;
int main(int argc, constchar * argv[])
{
char charArr[50];
cout << "Please enter in a string";
cin.getline (charArr,'\n');
char * c = NULL;
for (c = charArr; *c != '\0'; c++) {
cout << *c << endl;
}
return 0;
}