CrazyEngineers
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • rahul69

    MemberMar 21, 2013

    SDKING
    I have to querry about outtextxy() function.can i print the user input to the output window using outtextxy() function in c++ language????
    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?
    Are you sure? This action cannot be undone.
    Cancel
  • SDKING

    MemberMar 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.
    Cancel
  • rahul69

    MemberMar 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.
    Cancel
  • SDKING

    MemberMar 24, 2013

    i also tryed this boss.....but does'nt work.........👎
    Are you sure? This action cannot be undone.
    Cancel
  • rahul69

    MemberMar 25, 2013

    SDKING
    i also tryed this boss.....but does'nt work.........👎
    Well that is strange, as this is working on my machine, maybe your compiler has some problem. Try uninstalling and re-installing your TC++.
    Are you sure? This action cannot be undone.
    Cancel
  • Prateek Gupta

    MemberApr 17, 2013

    SDKING
    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...


    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.
    Cancel
  • SDKING

    MemberApr 20, 2013

    thanx...it working fine...
    Are you sure? This action cannot be undone.
    Cancel
  • Prateek Gupta

    MemberApr 22, 2013

    Most welcome brudda 😀
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register