Hi, imnewbie to c++ programming. Im want to read some txt file that have a data write inside. The data should be "WAT1235" which is the license plate number. Then if the programming read this data "WTA1234" it will give other information like the Roadtax, Colour of the car and etc. I want to display the output should be like :
OUTPUT DISPLAY:
WTA1235
Information:
Roadtax:.....
ModelCar:.....
etc..
This my coding for the fisrt step read the txt file, but have some error
Inline Code Example Here
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
void main(){
ifstream inFile;
inFile.open("test.txt");
//Check for Error
if (inFile.fail()){
cerr << "Error Opening File" << endl;
exit(1);
}
return 0;
}
Any suggestion and discuss will very helpfull.