目前有一个问题,程序在使用MSVS2010的调试模式下编译和运行正常,但是当我切换到发布模式时,它会在运行时崩溃并在无限内存地址处发生访问冲突。这是代码,其中包含程序在发布模式下爆炸的注释。它与inputstringstream运算符有关。
std::ifstream fileIn(filename);
//File was unable to be found
if(!fileIn){
std::cout << "Unable to open the specified file";
exit(1);
}
std::string line;
//Else if the file has been found read in the values and build a mesh
while(getline(fileIn,line)){
char Charsub;
std::string sub;
std::istringstream iss(line);
//Program blows up with access violation @ 0xfffffffffffff on the next line, but only in release mode, not debug
iss >> sub;