ROOT modify STL behavior with Visual C++ 2005 Express

Hello,

I want to use a code I have written in the Linux OS for the Windows OS. I use Visual C++ 2005 Express for that.

For this simple code in order to read a text file and stop when the sepcified word “Density” has been read:

std::ifstream file(“file.srim”);
std::string line;
while( std::getline(file, line) && ( string::npos == line.find(“Density”) ) ){
cout << "line " << line << endl;
}

I have completely different behavior since the libCore.dll is included or not in the project.

How should I proceed to avoid this?

Thank you.

bou

Hi,

this is at least a problem with debug vs. release builds and maybe even with incompatible MSVC7.1 and MSVC8 builds, see e.g.
root.cern.ch/phpBB2/viewtopic.php?t=4327
root.cern.ch/phpBB2/viewtopic.php?t=4130
root.cern.ch/phpBB2/viewtopic.php?t=4231

Axel.

Ok thank you very much for your reply it seems to work in release mode.

bou