Novice programmer reporting in
For the last three weeks I have been trying to make a small program that I will be using in a larger program that will make the user press space to see the next line of output.
Not exactly sure what I'm doing wrong, but I'm pretty sure that I need to put the space that the user would enter into an output file, and the read the input file
It runs, but it doesn't allow me press space before showing the next line.
I added a getline(cin, charVar) before, but I got a whole bunch of errors.
Any help would be greatly appreciated.
I am very new to C++ myself and not very familiar with in/outFile but as far as i can tell right now you don't have anyway for the user to input anything it just runs and closes.
I'm not sure if this will be of any help, but here is a poorly coded user forced next line code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#include <iostream>
#include <string>
#include <istream>
usingnamespace std;
int main() {
string input = "";
string space;
cout << "This is the first line ";
getline (cin, space);
cout << "This is the second" << space << "line.\n";
cout << "\n";
cin.get();
return 0;
}