turbo c++ question:text input in graphics mode

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
#include
#include

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<
                

Replies

  • confounded
    confounded
    okay i was extremely stupid...😒

    I should have given smaller numbers for gotxy arguments...oops.
    Anyway now that problem is solved.
  • Adwait
    Adwait
    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: #-Link-Snipped-#

You are reading an archived discussion.

Related Posts

If we ever gave an award to someone whom embodies the philosophy of CE, this man would get my vote. I've never met or talked to him, however his work...
hi, can some one give me ideas or topics for my final year project in computer engineering about any upcoming technology over which i can work for my project.
hi friends, my project is on SSL(Secure Socket Layer) Implementation. I need to code it in Java due to availability of ready security and other packages which would help me.....
What is difference between web server and application server? What i know is web server handles HTTP requests.It responds with static pages like HTML pages and can use other programs...
hello there.... what is the meaning of "material orientation" or "bar orientation" in "Properties Icon"? me in confusing mode.....😕