Can we print user input string to the output window using outtextxy() in C++ language?
I have to querry about outtextxy() function.can i print the user input to the output window using outtextxy() function in c++ language????
Replies
-
rahul69
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???? -
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
i want that quoted string given by user...#include #include 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.. //
plz...help me frnds... -
rahul69#-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👍 -
SDKINGi also tryed this boss.....but does'nt work.........👎
-
rahul69
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.........👎 -
Prateek GuptaSDKINGyes 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
i want that quoted string given by user...#include #include 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.. //
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. -
SDKINGthanx...it working fine...
-
Prateek GuptaMost welcome brudda 😀
You are reading an archived discussion.
Related Posts
How we can Multiply 4 bit binary Numers??Plz Any One Write The Source code for it...plz guys help me....
It all began with the reports of Apple developing a smart, connected wrist-watch that would be a handy companion to your smartphone or tablet. The iWatch was taken up by...
in whay way digital image processing is related to ece.
Hello Friends
I am in search of a individual with great knowledge of various mobiles, gadgets etc and always remain in sync with upcoming technologies
If interested then let me...
Today our CEan Praveen-Kumar is celebrating his birthday.
Let's wish him a rocking year ahead.
Many Many Happy Returns Of The Day PraveenKumar
🎉