| gtim (1) | |||
|
how can read the date saprate from input file into 4 dynamically arrays without the '/' the input file is like : 2 // the size of file shoa say/1111/2700/4/ jona fox/1112/2000/3/ the arrays ara string name,int account,int balance,int number how can but each element in the arrays this is my function code to read from the file
| |||
|
|
|||
| Catfish3 (279) | |
|
If your compiler is recent enough and supports C++11 well enough, I suggest you look into the regex library. http://cplusplus.com/reference/regex/ Otherwise use std::getline() and specify the character '/' as the delimiting character (default is '\n').http://cplusplus.com/reference/istream/istream/getline/ | |
|
|
|