Author Topic: Gotoxy  (Read 23629 times)

Skelletons

  • Guest
Gotoxy
« on: March 29, 2006, 09:16:52 pm »
Yop everybody(i'm french please exuse my english...)
Cheer everyone in this forum.
I have a probleme with code blocks
I can't use gotoxy  :? ... And I need your help.
I want to know if it is possible to place texte in a part of the console
exemple gotoxy(10,20);
           printf("yop");
and it print yop at the position 10 and 20 or if it exist an other fonction for this...
Thank you in advance

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Gotoxy
« Reply #1 on: March 29, 2006, 09:27:40 pm »
Afraid Code::Blocks does not do that, sorry. You cannot type in the console.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Gotoxy
« Reply #2 on: March 29, 2006, 09:34:47 pm »
The problem you're facing isn't related to Code::Blocks, it's related to the compiler it's using (MinGW by default), and it's because that function isn't standard and wasn't implemented in that compiler. I'mn't sure if Borland still provides conio.h, but you could try this one for MinGW.

And please, any programming related question that has nothing to do with Code::Blocks, ask it in an appropriate forum (I don't really mind, but it helps keeping these forums "clean").

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: Gotoxy
« Reply #3 on: March 29, 2006, 10:52:49 pm »
What's this yop thing anyway?
Life would be so much easier if we could just look at the source code.

Offline Vampyre_Dark

  • Regular
  • ***
  • Posts: 255
  • Hello!
    • Somewhere Over The Rainbow...
Re: Gotoxy
« Reply #4 on: March 30, 2006, 10:54:00 am »
Are you working in windows? If you are, the old console functions are not included in the standard headers and you have to use the windows console functions.

Like this: SetConsoleCursorPosition(hConsole, TL); <-- you need the handle to your console, use this at the start of your program to get it  HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);

Here is a link to the win32 console functions.
Here is an article that might help

You will need to include windows.h to use these. Just a tip, do it like this to not included all the other windows stuff you won't need in the console

#define WIN32_LEAN_AND_MEAN
#include "windows.h"


Hope that helped.

As for the 'yop'. I think he works for Homeland Security, this is how far they have gotten.
C::B Wishlist
~BOYCOTT THE EVIL YELLOW BOXES~

Skelletons

  • Guest
Re: Gotoxy
« Reply #5 on: March 31, 2006, 08:01:58 pm »
Thank you all!
I'me working in windows and Ubuntu but I can't install code blocks for i386 for ubuntu(if you have a suggestion...)
this link seem to be good http://conio.sourceforge.net/ but I can't install the .DevPak in code blocks I'me not able to use the plugin for this
help me please...

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Gotoxy
« Reply #6 on: March 31, 2006, 08:15:36 pm »
[..]Ubuntu but I can't install code blocks for i386 for ubuntu(if you have a suggestion...)

Hello,

What are your problems/errors? How are you installing C::B?

If you wish, Ubuntu .deb package of C::B are proposed in the Nightly Builds sub-forum. Just download the latest and install it.

Best wishes,
Michael

Skelletons

  • Guest
Re: Gotoxy
« Reply #7 on: March 31, 2006, 08:27:26 pm »
I have download codeblocks_1.0rc2-1_i386.deb and use dpkg and he said me
Error with displaying error for dialog of class cannot_load_entry

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Gotoxy
« Reply #8 on: March 31, 2006, 08:34:00 pm »
I have download codeblocks_1.0rc2-1_i386.deb and use dpkg and he said me
Error with displaying error for dialog of class cannot_load_entry

RC2 is a bit old :). I have just upload the .deb package of rev2285 on my File Hosting (see my signature). Before installing it, I would advice you to uninstall RC2 and to check if all the libraries .so of RC2 have been deleted. Then you can install the rev2285.

Best wishes,
Michael

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Gotoxy
« Reply #9 on: March 31, 2006, 08:47:37 pm »
this link seem to be good http://conio.sourceforge.net/ but I can't install the .DevPak in code blocks I'me not able to use the plugin for this
help me please...

You should download the .DevPack from Sourceforge. If you have never used the DevPack plugin, you should start it, select a download directory for the packages (chose carefully, because if you want to change it, then you will have to modify its path in default.conf of C::B). When you have your directory, you copy there the conio .DevPack. After you start the plugin, you select unter "Filtering" the option "Downloaded, but not installed" and you chose in "Update server" an option. It should find your conio .DevPack that can be installed by clicking it with the right button of the mouse.

Best wishes,
Michael

Skelletons

  • Guest
Re: Gotoxy
« Reply #10 on: April 01, 2006, 08:57:53 pm »
very very thanks you are the best ^^ and thx for the other