Dear All!
I am trying to read lines from an input file. in one line There a are some words and double type numbers. I would like to assign these values to some string variables and double variables. For that reason I have to know the type of variable.
What is the best way? Any help appreciated. thanks!
code part ia mtrying to read the input file is the following: you can complete it.
Code:string line, temp; double number; while(getline(fmonju,line)){ if(!line.empty()){ istringstream iss(line); while(iss.good()){ iss>>temp; // ???? iss>>number; // ??? } } }