main()
{
int r=1;
clrscr();
while (!kbhit())
{
gotoxy(30,r);
cout<<"welcome\a";
gotoxy(30,r); //go to x cordinate of column , y cordinate of row
clreol(); //clear end of line
r++;
if(r==24) r=1;
}
getch();
//system("pause");
}
I dont really understand your question, what is the error message that you get?
just a tip it's easier to read your code if you place it in code tags like this
#include <iostream.h>
#include <conio.h>
//#include <stdlib.h>
main()
{
int r=1;
clrscr();
while (!kbhit())
{
gotoxy(30,r);
cout<<"welcome\a";
gotoxy(30,r); //go to x cordinate of column , y cordinate of row
clreol(); //clear end of line
r++;
if(r==24) r=1;
}
getch();
//system("pause");
}
main()
{
int r=1;
clrscr();
while (!kbhit())
{
gotoxy(30,r);
cout<<"welcome\a";
gotoxy(30,r); //go to x cordinate of column , y cordinate of row
clreol(); //clear end of line
r++;
if(r==24) r=1;
}
getch();
//system("pause");
}
i have enable code tag but its not copied here..
Code tags are a formatting thing you use on this page, not elsewhere. Edit your post, then select your code, then press the <> button on the right on the format menu.
It would be easier if you post your compiler errors in full.
1 C:\Dev-Cpp\include\c++\3.3.1\backward\iostream.h:31, from D:\C Programs\fun2.cpp In file included from C:/Dev-Cpp/include/c++/3.3.1/backward/iostream.h:31, from D:/C Programs/fun2.cpp
1 D:\C Programs\fun2.cpp from D:/C Programs/fun2.cpp
2 C:\Dev-Cpp\include\c++\3.3.1\backward\backward_warning.h:32 #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
D:\C Programs\fun2.cpp In function `int main()':
8 D:\C Programs\fun2.cpp `clrscr' undeclared (first use this function)
(Each undeclared identifier is reported only once for each function it appears in.)
10 D:\C Programs\fun2.cpp `display' undeclared (first use this function)
D:\C Programs\fun2.cpp In function `void display()':
18 D:\C Programs\fun2.cpp `void display()' used prior to declaration