/**
* function: read from a file line by line
* args : file name
**/
#include<fstream>
#include<string>
using namespace std;
void ReadFromFile(char * file)
{
ifstream fin;
fin.open(file, ios::in);
if(!fin)
{
// show a message
return ;
}
string line;
while(getline(fin, line))
{
// deal with line, for example, separate by '='
// char l[50] = "";
// strcpy(l, line.c_str());
// char * x = strtok(keymap, "=");
// char * y = strtok(NULL, "=");
}
fin.close();
}