User forums > Using Code::Blocks
Gotoxy
Skelletons:
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
thomas:
Afraid Code::Blocks does not do that, sorry. You cannot type in the console.
Ceniza:
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").
yop:
What's this yop thing anyway?
Vampyre_Dark:
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.
Navigation
[0] Message Index
[#] Next page
Go to full version