@confounded • 26 Jan, 2009
I have a question... how i can get input from the user in graphics mode. I want the cursor placed directly after "Enter number here: " but I'm not able to do that using cin. even the gotoxy statement doesnt work in graphics mode. Is there any other function i should use?

Also how can i display the number using outtextxy...it takes only string as argument?

Here is my code:
#include<stdio.h>
#include<conio.h>
#include<graphics.h>

int main()
{
int num;
int gd=DETECT, gm;
initgraph(&gd,&gm,"c:\\tc\\bgi");
settextstyle(1,0,2);
outtextxy(100,100,"Enter number");
cin>>num;
outtextxy(100,200," The number is: ");
cout<<num;
getch();
closegraph();
}
@confounded • 26 Jan, 2009 okay i was extremely stupid...😒

I should have given smaller numbers for gotxy arguments...oops.
Anyway now that problem is solved.
@Adwait • 08 May, 2016 I see....
I have created a function in c++ which can be used to take input in graphics mode.

If you want that please contact me on my email id. I will send you.

My email id: adwaitthattey@gmail.com

Related Posts

I thought of compiling a list of the coolest and the best whatsapp group names that you've been using for your respective groups. For the sake of convenience, we'll stick...
A simple good bye email or last working day mail ain't cool! We've some awesome templates that you can use. If you're looking for an amazing Last Working Day email...
Hello CEans, How to convert CGPA (10 Point Scale) to Percentage? Please help!
I heard many students are having a trouble registering on the TCS Portal, when it's quite straightforward actually. If you have problem in attaching photos or CV, Use internet explorer...
What is IES or Indian Engineering Services Exam? Union Public Services Commission (UPSC) conducts the Engineering Services Exam or ESE 2016 is an entrance exam for graduates who wish to...