I know that in the older versions of Builder (BCB 6 and older), you can. I suspect that the newer versions can, too, but I haven't tried it in them.
In BCB6 and older, there were two ways. One was to create the app in the IDE by selecting Console App instead of a Windows App or form. I've never done it this way, though.
The way I prefer was to just use my favorite editor, write and save the code, then call BCC32 to compile the .cpp file. I wrote many console apps that way.
James P. Cottingham I'm number 1,229!
I'm number 1,229!
Hi thanks, what I meant was that there already is a very large application I need to debug which uses forms, but I want to get console input and output as well..
possible?
It can be done but it is not a trivial thing to do. I do one of two things, I either send my output to a file via streams, or I use a message box. I prefer the message box since it is much simpler to use.
Code:
AnsiString MsgStr;
//MsgStr collects from info that you need to send out
//Use App's message box
Application->MessageBox(MsgStr, "Here's the info.", MB_OK);
//Or use a dialog box
MessageDlg(MsgStr.c_str(), mtInformation, TMsgDlgButtons() << mbOK, 0);
For error checking I prefer the App's message box since I can set the title but either one works.
James P. Cottingham I'm number 1,229!
I'm number 1,229!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.