Hi. Can someone help me to rectify the problem of my end of file? When I execute this problem, it cannot input the variables and I don't know what is the problem. Thanks in advance!
Here is the question:
Type 3: There are several lines containing the information of the given operations. Each line contains one string, denoting the operator and two bits denoting the operands. Read until end of file.
Sample Input 3
3
AND 1 1
OR 1 0
Sample Output 3
1
1
Question: for the purposes of your project, why is it important you reach end of file?
Also, you can actually make it so your program can treat your .cpp as output. Notice how in the tutorial they have fileObject( fileName )? Instead of .txt, you just call your main.cpp