Hello,
Let's say i have a text input file consist of numbers and letters. How should i put them into an vector. I want numbers to stay as int, letters as strings.
In this code input file reads as it's input is string. What should i do? Should i use templates? How?Code:void PutInputToArray(ifstream &dfa,tvector<string> &v) { string word; while(dfa >> word) { v.push_back(word); } }
Thanks.