processLine(line); //this function we'll use to handle the specific line.
cout << "Error opening file." << endl;
From there i'd write a function to split a string, into a vector of its words. vector<string> splitString(string s);
so if we had the string "the quick brown fox," the function would find all the white spaces in the line (using string::find). You would find white spaces at indexes 3, 9, and 15. Then use string::substr to get substrings from 0-3, 3-9, 9-15, 15-std::string::npos. Put the results in a vector and return it.
void processLine(string s)
vector<string> words = splitString(s);
//So we know that the first word in the vector will be the operation.
if(words == "CONVERT")
//do what you need to do to convert here
elseif(words == "NOT")
//NOT logic here
elseif(words == "AND")
//convert words, and words into an integer value (perhaps using stringstream?)
int a, b;
cout << a & b << endl;
//and so on...