I don't understand why it's not working.. I've made programs using the same syntax and I haven't had any problems but now for some reason its skipping lines. To be specific: its skipping the first, reading the second, skipping the third and so on.
I copied the code into a new program and ran it and it worked awesome. But when it's in the original program that has a lot of voids and I'm only running this one and its not working. Did anybody have this problem as well? I just don't understand. Any help is much appreciated.Code:void LoadRegistry() { ifstream reg ("Registry.txt"); string line, s1, s2; size_t pos; if (reg.is_open()) { while ( reg.good() ) { getline (reg, line); if (line != "") { getline(reg, line); pos = line.find(string1); s1 = line.substr(0, pos); } } } }
Thanks!



LinkBack URL
About LinkBacks


