Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I have learned more through this forum than I did on a two day course. Thanks to everyone for their help and other postings that I have found useful..."

Geography

Where in the world do Tek-Tips members come from?
markus3000 (Programmer)
24 Aug 10 12:07
I'd like to get a console window up for debugging purposes, even though it's an "Application"; then I can use cin and cout.  Is this possible?

thanks
2ffat (Programmer)
24 Aug 10 12:15
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!

markus3000 (Programmer)
24 Aug 10 12:25
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?
2ffat (Programmer)
24 Aug 10 13:44
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!

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close