Author Topic: Copy/Paste program text  (Read 9910 times)

psychonut

  • Guest
Copy/Paste program text
« on: November 14, 2007, 07:28:02 pm »
Hi, sorry if I use any incorrect terms, but the question is clear I think.
I recently switched to Code::Blocks to use as a c++ compiler for my programming class. We write small console applications and part of the requirements for each assignment is to attach the output of the console window to the code.
My program runs fine, but I can't seem to find a way to copy the text from the console window to paste elsewhere.
Can anyone point me in the right direction if this is possible?

OS: Ubuntu Edgy
Code::Blocks
Build: Sep 5 2007, 16:38:43 - wx2.8.4
svn build rev 4425

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Copy/Paste program text
« Reply #1 on: November 15, 2007, 07:08:42 am »
My program runs fine, but I can't seem to find a way to copy the text from the console window to paste elsewhere.
Can anyone point me in the right direction if this is possible?

Did I understand it right?
The output of console of the console application should be put into the .cpp-file (for example in a comment-block) ?

If you have created the application using the wizard the console (xterm) should stay opened until you press any key.
You normally can easily copy and paste from there with the mouse.
Try to highlight the text you want with the left mousebutton pressed, then release the mouse-button and paste the text with the middle-button of the mouse.

If the console-window closes immediately after the end of the program, try this:
right-click on your project in manager, choose "Properties -> Build targets".
On the right side the type should be "Console application" and the "Pause when execution ends"-checkbox should be checked.

If that doesn't help try to run the compiled executable from command-line and copy and paste the output from there.
If you don't know the name and path from the executable you can see it also in the tab "Build targets".