Since gotoxy() function can have maximum values (35,25)
I want to know is there any alternative to this which i can use in Turbo C++ 4.5 version.
I have to make a project and therefore i urgently require a one for a better look of my project.
Printable View
Since gotoxy() function can have maximum values (35,25)
I want to know is there any alternative to this which i can use in Turbo C++ 4.5 version.
I have to make a project and therefore i urgently require a one for a better look of my project.
There is no such function as "gotoxy()" in the Windows API.
Why such an old compiler? Using compilers that are close to 20 years old is not the way to start (or finish) projects, unless you are working strictly with the 16-bit MSDOS operating system.Quote:
I want to know is there any alternative to this which i can use in Turbo C++ 4.5 version.
If your "gotoxy()" is a function that moves the screen cursor, the correct way to do this for the Windows OS is to use the Windows Console API.
http://msdn.microsoft.com/en-us/libr...73(VS.85).aspx
And the function to use is SetConsoleCursorPosition.
Regards,
Paul McKenzie
can gotoxy() have negative parameters like gotoxy(33,-22)
I have used it and it is working.
I typed somewhat 30 lines and i used gotoxy(1,1) and it was moving cursor to 6th line instead of starting position of output screen and it was placed at starting only when i used gotoxy(1,-5)
Is it correct to use.
gotoxy() is a Borland specific function that uses DOS interrupts to move the cursor position around in a DOS window (not an NT console). Either get a new compiler, or go back to Windows 98.
You keep asking questions on "gotoxy", and I'm telling you that there is no such function for the Windows API.
This is the Windows API forum, and I already posted to you the links that show you how to move the screen cursor using Windows API calls.
It does not work for an NT console program. Calling that function will probably just crash. As hoxsiew stated, that function only works for MSDOS 16-bit operating system and MSDOS 16-bit consoles.Quote:
I have used it and it is working.
Regards,
Paul McKenzie
what can i do? i have to use only that compiler as our school provides us that and we do all our programs on that compiler.
And the today used commands that you have mentioned doesn't work on that.
That is why i was asking for the commands that work on turbo only.
But thank you for the advice.
I will definitely go to new compiler at my home.
You cannot learn C++ properly using Turbo C++ 4.5. The compiler is non-standard and is almost 20 years old. If you paid money for the course you're taking, you should drop the class and ask for a refund -- you're wasting your time (and money).
You are in the Windows API forum, where the Windows API is discussed. You are not in the "turbo C++" forum. Therefore the answer I gave you as to how to move the cursor is the correct one when programming a console Windows application.Quote:
And the today used commands that you have mentioned doesn't work on that. That is why i was asking for the commands that work on turbo only.
If you want "turbo C++" answers, then post in the Non-Visual C++ forum. But let me say that you will more than likely get the same answers you got here.
Regards,
Paul McKenzie