how I can read data after '=' from my file to my variables?
Learn more about parsing techniques, notably about recursive descent parsers.
Indeed, you should read the entire line (e.g. with std::getline
, or perhaps even readline(3) on Linux, if the configuration is interactive) then use appropriate parsing techniques on the line you have got.
Consider reading the first half of the Dragon Book. It should help you a lot.
You could also find some free software libraries (like libconfig and many others) to parse configuration files. See e.g. this related question.
You could also use parser generators like GNU bison (to be perhaps used with flex) or ANTLR. They would generate for you some C or C++ code, once you provided them some annotated grammar describing your input language. For documentation purposes at least, you want to describe that input language (something explaining the expected contents of your config.ini
) in EBNF notation.