Member • Mar 21, 2013
-
SDKINGI have to querry about outtextxy() function.can i print the user input to the output window using outtextxy() function in c++ language????
-
Member • Mar 21, 2013
Yes u can, just be sure to include graphics.h in your program😀 . By the way Did u tried using it? what problem did u faced while trying to use it?SDKINGI have to querry about outtextxy() function.can i print the user input to the output window using outtextxy() function in c++ language????Are you sure? This action cannot be undone. -
Member • Mar 21, 2013
yes i include graphics.h header file.....but when we having to print the input given by user at the specific location it is not work....
i tryed this... #include<iostream.h> #include<conio.h> #include<graphics.h> void main() { char str[20]; int gd=DETECT,gm; initgraph(&gd,&gm,"c:\\tc\\bgi.cpp"); cout<<"Enter String:-"; cin>>str; outtextxy(200,300,str); getch(); } outtextxy(200,300,str); i having problem with this...... // if i written like this- outtextxy(200,300,"HELLO");// it prints the HELLO string but it is static.. //
i want that quoted string given by user...
plz...help me frnds...Are you sure? This action cannot be undone. -
Member • Mar 22, 2013
#-Link-Snipped-# , well in my opinion, it is better to use some other platform for graphics, as graphics.h is obsolete. Also I guess, u are using Turbo C++ , and I will recommend u to use some latest IDE like VC++ etc.
Now coming to question:
You are writing:
initgraph(&gd,&gm,"c:\\tc\\bgi.cpp");
It should be "bgi" instead of "bgi.cpp" as bgi is a folder.
Hope it solves ur problem👍Are you sure? This action cannot be undone. -
Member • Mar 24, 2013
i also tryed this boss.....but does'nt work.........👎Are you sure? This action cannot be undone. -
Member • Mar 25, 2013
Well that is strange, as this is working on my machine, maybe your compiler has some problem. Try uninstalling and re-installing your TC++.SDKINGi also tryed this boss.....but does'nt work.........👎Are you sure? This action cannot be undone. -
Member • Apr 17, 2013
SDKINGyes i include graphics.h header file.....but when we having to print the input given by user at the specific location it is not work....
i tryed this... #include<iostream.h> #include<conio.h> #include<graphics.h> void main() { char str[20]; int gd=DETECT,gm; initgraph(&gd,&gm,"c:\\tc\\bgi.cpp"); cout<<"Enter String:-"; cin>>str; outtextxy(200,300,str); getch(); } outtextxy(200,300,str); i having problem with this...... // if i written like this- outtextxy(200,300,"HELLO");// it prints the HELLO string but it is static.. //
i want that quoted string given by user...
plz...help me frnds...
try getting the input from the function gets()
ex:- gets(str);
or try function getline()
ex:-getline(str,20);
hope it will work but if doesn't then plz post the exact error which you r getting by the compiler.Are you sure? This action cannot be undone. -
Member • Apr 20, 2013
thanx...it working fine...Are you sure? This action cannot be undone. -
Member • Apr 22, 2013
Most welcome brudda 😀Are you sure? This action cannot be undone.