Follow Us on:
Home
About Us
Staff
Current Events
Forum
Tutorials
C Language
>
Operators
Data Types
Decision Making
Looping Statements
Gotoxy and Textcolor
Array
Java
HTML/XHTML
CSS
>
CSS Syntax
CSS Id and Class
CSS How To
Photoshop
Visual Basic
CPP Programming
Resources
Downloads
_
_
_
C++ Programming
GOTOXY IN C++
This is a sample program that shows how you can use the traditional gotoxy function in turbo to c++ programming.
_
#include <iostream>
#include <windows.h>
using namespace std;
void gotoxy(short x, short y)
{
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE)
;
COORD position = {x,y};
SetConsoleCursorPosition(handle, position);
}
int main(void){
gotoxy(28,1);
cout<<"THIS IS HOW YOU..."
<<endl;
gotoxy(18,8);
cout<<"...USE A GOTOXY FUNCTION IN C++..."
<<endl;
gotoxy(7,15);
cout<<"...BY USING THE HANDLE,COORD and SetConsoleCursorPosition Functions!"
<<endl
<<endl
<<endl;
gotoxy(25,18);
return 0;
}
simple c programming tutorial