Expected type for parameter 2, but found '_TCHAR'

This is a discussion on Expected type for parameter 2, but found '_TCHAR' within the C Programming forums, part of the General Programming Boards category; Why do I get that error when I try to compile this code Code: #include<windows.h> int _stdcall _tmain(int argc, _TCHAR* ...

  1. #1
    Registered User
    Join Date
    Aug 2011
    Posts
    385

    Expected type for parameter 2, but found '_TCHAR'

    Why do I get that error when I try to compile this code

    Code:
    #include<windows.h>
    
    int _stdcall _tmain(int argc, _TCHAR* argv[])
    {
    }

  2. #2
    Registered User
    Join Date
    Jun 2005
    Posts
    6,531
    This is not a C problem. It belongs in a windows programming forum.

    Odds are you've configured your compiler (or used compilation options) to turn off Microsoft extensions, or you are using a compiler that does not support such extensions.

    That's only a guess though - you haven't really provided enough information (the compiler and compiler settings you have in play is an important consideration).
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy in reply to you, it is likely you deserve it. Suck it up, sunshine, and read this, this, and this before posting again.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Expected constructor, destructor, type conversion
    By SterlingM in forum C++ Programming
    Replies: 6
    Last Post: 03-26-2010, 02:16 PM
  2. compiler not inferring template type as expected
    By Elkvis in forum C++ Programming
    Replies: 13
    Last Post: 11-12-2008, 06:04 AM
  3. expected constructor, destructor, or type conversion before '('
    By cosmiccomputing in forum C Programming
    Replies: 5
    Last Post: 06-17-2008, 12:03 AM
  4. Type Name Expected HELP!!!!
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 08-15-2002, 11:33 AM
  5. Type name expected error
    By SilasP in forum C++ Programming
    Replies: 4
    Last Post: 12-09-2001, 02:05 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21