Explain why this happens and what I can do, please:
Thanks!Code:#include <iostream.h> void main() { int junk; char strSkipped[10], strNext[10]; cout << "C++ is messed up!\n"; cin >> junk; cout << "\nThis next getline will be skipped for me\n"; cin.getline(strSkipped,9); cout << "\nBut then this is able to be accessed.\n"; cin.getline(strNext, 9); }
sirSolarius