1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
ifstream in(filename, ios::in);
string input = " ";
string input2 = " ";
input = in.get();
getline(in,input,']');
in.ignore(numeric_limits<streamsize>::max(),'\n'); //Ignoring untill the next line
getline(in,input,'='); //Reading the Keyword
cout << "input1 = " << input << endl;
getline(in,input2,';'); //Reading the Value
cout << "input2 = " << input2 << endl;
basic_vals.push_back(obj(input,input2));
in.ignore(numeric_limits<streamsize>::max(), '\n'); //Ignoring till the next lie
getline(in,input,'='); // Reading the Keyword
cout << "input1 = " << input << endl;
getline(in,input2,';'); // Reading the Value
basic_vals.push_back(obj(input,input2));
in.ignore(numeric_limits<streamsize>::max(), '\n'); //Ignoring till the next line
getline(in,input,'='); //Reading the Keyword
cout << "input1 = " << input << endl;
getline(in,input2,';'); //And the Value
cout << "input2 = " << input2 << endl;
basic_vals.push_back(obj(input,input2));
in.ignore(numeric_limits<streamsize>::max(), '\n');
|