Thread: Error message

  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    53

    Error message

    Hi,

    I'm having some trouble with my code. I can't figure out how to solve this problem.


    error C3861: '_getch': identifier not found

  2. #2
    Registered User
    Join Date
    Mar 2005
    Location
    Juneda
    Posts
    291
    Have you included the header for that nonstandard function?

    Niara

  3. #3
    Registered User
    Join Date
    Jul 2007
    Posts
    53
    I found the problem, I didn't include <conio.h>.

    But now I get these errors, and I can't find the solution to fix them:

    -fatal error LNK1120: 1 unresolved externals

    -error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup MSVCRTD.lib


    also I'm using Visual Studio 2005 to create my program:
    -this is what I did, I created a New Project, Other Languages, Visual C++, Win32, Win32 Project.
    -then I chose Windows Application, and Empty Project
    -then clicked Finish
    -then I copied my code down
    Last edited by vopo; 10-03-2007 at 01:50 AM.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Your program begins with main(), a console program.
    Your compiler thinks you're building a GUI program, beginning at WinMain()

    Change the project type back to console.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    Registered User
    Join Date
    Jul 2007
    Posts
    53
    arrite I'll try that

  6. #6
    Registered User
    Join Date
    Jul 2007
    Posts
    53
    it works

    thanks

Popular pages Recent additions subscribe to a feed