C/C++ WxDev C++ and Console outputting

  • Thread starter Thread starter cpscdave
  • Start date Start date
  • Tags Tags
    C++
Click For Summary
The discussion revolves around a user transitioning from Python to wxC++ for their programming project due to issues with their Python implementation. They express frustration with syntax differences, particularly the need for semicolons in C++. The main concern is finding a way to output console messages while using DEV C++, as standard output methods like printf and cout do not display results. Suggestions include using AllocConsole() to create a console window and references to additional resources for managing console output in a GUI context. There is a debate about the necessity of combining wxWidgets with console output, with some participants advocating for logging output to a file instead for debugging purposes. The user has implemented a temporary solution by creating an object that writes output to a file, which they monitor with a tail command.
cpscdave
Messages
402
Reaction score
120
So I ran into a problem with my Python implementation and have decided to rewrite my program in wxC++ instead of wxPython.

Starting to make some progress (I keep forgetting to put ;'s at the end of lines DAMN YOU PYTHON!)

ANyone know how I can output to a console? I was using LiClipse for the python dev and any prints went to the console in the IDE.

I'm now using DEV C++ but if I do printf's or cout's I don't see the outputs.
Anyone have any ideas??

Thanks!
 
Technology news on Phys.org
Why are you combining wxWidgets and a console? The way to show the console is somewhere in the project file, but usually the point of the wxWIdget is to see only your main window. Can you simply log your output somewhere?
 
newjerseyrunner said:
Why are you combining wxWidgets and a console?

I used the console to output debugging information. Its nice to be able to output information in an easy format when building stuff.

@256bits Thanks I'll look into that. What I've done as a quick workaround is built a little object that writes to a file, which I just monitor using tail
 
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
Replies
3
Views
2K
  • · Replies 15 ·
Replies
15
Views
8K
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
6
Views
3K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 25 ·
Replies
25
Views
2K
  • · Replies 23 ·
Replies
23
Views
3K