Help improve this INI parsing code
问题 This is something simple I came up with for this question. I'm not entirely happy with it and I saw it as a chance to help improve my use of STL and streams based programming. std::wifstream file(L"\\Windows\\myini.ini"); if (file) { bool section=false; while (!file.eof()) { std::wstring line; std::getline(file, line); if (line.empty()) continue; switch (line[0]) { // new header case L'[': { std::wstring header; size_t pos=line.find(L']'); if (pos!=std::wstring::npos) { header=line.substr(1,