Sunday 15 May 2011

c++ - ifstream not working in Code::Blocks debug mode -



c++ - ifstream not working in Code::Blocks debug mode -

first code:

std::ifstream resolution; resolution.open("resolution.txt"); if(resolution.is_open()) { std::cout << "open"; } else { std::cout << "not open"; }

this programme works (prints "open" , can read file) when build , run windows explorer folder when press run button in code blocks or seek utilize debugger prints "not open" , crashes when seek read file.

i have found soil (the opengl utility) cannot read files when run within code blocks

how enable file loading when debugging?

change working director debug executable.

c++ codeblocks

No comments:

Post a Comment