Hello all. I am stuck on a project I am working on, and need some help. I'm still kind of a beginner with C++, but it seemed like this topic wouldn't be good for the beginners forum.
I need to get some input from the stdin, but I don't know how to create a stream object and give it stdin. Any suggestions?
It is a project for a class where we are learning to program in Unix/Linux. The goal is to simulate the process scheduler, using a few of the different algorithms like round robin, fcfs, ect. We get information about the processes from the user from stdin by either directing a file to stdin, or letting the user enter information. for example, at run-time I would enter this at the command line:
./project8 < in.txt
or else just use stdin to let the user enter the necessary info manually.
So, if I'm understanding correctly, I don't need to create a stream object at all, I can just say something like this: