Hi,
I'm trying to write this program where there is:
(1) a greeting
(2) make columns
(3) have a stored text file input into the program automatically
The file is like so:
NOT 11010011
AND 10010010
etc.
(4) read the first word and then output it
(5) read the first binary number pattern and output it
Thusfar I have made (1) and (2) and (3), but I'm having difficulties with (4). I tried searching online, but all I come across is getline in bit format.
would I do
#include <fstream>
#include <iostream>
#include <iomanip>
using namespace std;
int main ()
{
char CONVERT [7];
string fileNAME;
greeting ();
cout << setw(10) << "COMMAND" << "Operand #1" << "Operand #2" << "Shift" << "Result" << endl;
cout << setfill('-') << setw(50) << "-" << endl;
ifstream inFILE;
cout << "Please enter file name:";
cin >> fileName;
inFile.open (fileName.c_str()):
[B]getline (CONVERT,7)[/B]
return 0;
}