no output from program

I swear that I'm going crazy here. I've been working on a program and noticed that changes I was making to the program were not occurring.

So I put

std::cout << "TESTING";

on the line after "int main(){"

but even though it compiles the output is blank. (I deleted the executable,closed the terminal etc).

When I delete the actual code (which just leaves the about std::cout line) it displays "TESTING". What is happening!!!
Most likely you'll have to flush the output buffer. shifting in std::endl usually does the trick:
std::cout << "TESTING" << std::endl;

That doesn't explain why the change you make to the code aren't showing up in your executable... unless they are also printing to console.
Post the code?
Ah std::endl does the trick.

I still think this is weird after the program has finished.
Topic archived. No new replies allowed.