Jump to content

Recommended Posts

Posted (edited)

Hi!

How do I write to the SciTe console just like ConsoleWrite() does? When I try writing to it with std::cout the data isn't shown until the autoit process terminates. Do I need to tell SciTe that I have written to the standard stream or something?

Edited by monoceres

Broken link? PM me and I'll send you the file!

Posted

Use std::endl to flush the stream.

std::cout<<"Test"<<std::endl;
Oh, never would have figured that out. I tried using "\n" for line breaks.

Thanks!

Broken link? PM me and I'll send you the file!

Posted

Is it not standard to use std::endl for outputting? I never even thought to try to use a "\n" to be honest.

Posted

It is standard. But apparently monocres didn't read where streams are buffered and need flushed which is one of a couple things std::endl does.

Posted (edited)

I guess I read something about it when I started learning C++ a few years ago, but since then I really have had no reason to read up on std::endl since there was no visual difference between it and "\n" when doing regular C++ console apps.

Edited by monoceres

Broken link? PM me and I'll send you the file!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...