Setting up an additional console for std I/O | General C++ Topics | Forum


Please consider registering

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Setting up an additional console for std I/O
July 31, 2013 - 3:15 pm
Member Since: July 31, 2013
Forum Posts: 6
sp_UserOfflineSmall Offline


first of all, I realy like book. I didn't think, it would be able to get into DSP so fast. But for the next time, an optional hard cover would be great. (People would spend the money on that.) :)

To the topic. I am not the best C++- Programmer. I am currently studying CS in Germany but we only had Java and C so far and only the basics of programming. Right now, in Chapter 7, I start making some funny mistakes while programming and I would realy like to have an additional output-console wich I can use with in the project.

Is there a simple way to do this? For example a bit of code i write in the constructor wich opens a console in the background?


PS: I hope my english is not that bad. ;)

August 1, 2013 - 1:42 am
Member Since: January 29, 2017
Forum Posts: 690
sp_UserOfflineSmall Offline

Hi William -

Glad you are enjoying the book!

RackAFX has a built-in Debug Window called the "Status Window" that you can send strings to from anywhere in your code EXCEPT the constructor. This makes it easy to send these messages directly into RackAFX. You can get details about how to use the Status Window on the Tips page here:

If you want to use something similar to TRACE (a macro only available with MFC - RackAFX plug-ins do not use MFC for several reasons; first, to be lean and secondly to be as compatible as possible with XCode/MacOS). If you want to use a similar macro, add the following code to the top of your .cpp file (NOTE: you will need to remove this (or comment it out) and all references to it if you use the Export To AU and compile in XCode.)

Get the code from here (its the first answer)

You can then use it like this:

TRACE("This is a debug message!\n");

The \n forces a carriage return (new line). The message appears in the Output Window in Visual Studio.

You can also use the helper functions I describe on the Tips page above to do things like convert ints and floats to strings or concatenate strings; then you can use the TRACE macro above to log them.

I have used a custom console window in the past, but it was a pain and very slow; it used Windows Pipes to send text. I don't remember the name of the debug window app, though Frown Anyone else have a console debug logger that works with Win32 (and not MFC)? If so, please post it here!

The Status Window and/or TRACE macro should help you out with your debugging.

- Will

August 1, 2013 - 4:41 am
Member Since: July 31, 2013
Forum Posts: 6
sp_UserOfflineSmall Offline

Well, that is exaclty what I am looking for. :) Sorry that i missed the Status Window in the first place but better later than never.

I should propably take a break for today, it is 2:00 am over here. ;)

Forum Timezone: America/New_York

Most Users Ever Online: 152

Currently Online:
5 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Chaes: 56

Skyler: 48

StevieD: 46

Derek: 46

Frodson: 45

Peter: 43

TheSmile: 43

Nickolai: 43

clau_ste: 39

jeanlecode: 37

Member Stats:

Guest Posters: 1

Members: 775

Moderators: 1

Admins: 6

Forum Stats:

Groups: 13

Forums: 42

Topics: 846

Posts: 3353

Moderators: W Pirkle: 690