CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2005
    Posts
    38

    getch() function include files

    Hello everybody

    I`ve tried compiling some old code I`d written using an old Borland C++ compiler under Microsoft Visual C++ 6.0 sp6. That code uses the getch() console function heavily. I`ve included <conio.h> in the program source files but the linker complains that the function cannot be found.

    I searched MSDN and I found that the conio.h header file is required. Nonetheless the compiler is still issuing errors? Am I missing something?

  2. #2
    Join Date
    Mar 2005
    Location
    Romania,Cluj-Napoca
    Posts
    1,073

    Re: getch() function include files

    Did you real cearfullty the MSDN ?
    Code:
    _getch();
    Please use code tags [code] [/code]

    We would change the world, but God won't give us the sourcecode..
    Undocumented futures are fun and useful....
    ___
    ______
    Gili

  3. #3
    Join Date
    Aug 2002
    Location
    Cluj-Napoca,Romania
    Posts
    3,496

    Re: getch() function include files

    getch and conio.h should do just fine. try to replicate this problem in a new console application and if you manage to do it post the code here.

    PS: but as gili pointed out you should use the _getch() version.
    Har Har

  4. #4
    Join Date
    Apr 2005
    Posts
    38

    Re: getch() function include files

    ok. I tested it out with the _getch() and it seems to be working. Maybe it was something with some other include files I had in the project. I`ll have to check it again tomorrow at work and get back to you.

    thx, a lot

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured