Results 1 to 10 of 10

Thread: VC++7 Problem

  1. #1

    Thread Starter
    Lively Member FantastichenEin's Avatar
    Join Date
    Mar 2000
    Location
    dairy
    Posts
    106

    VC++7 Problem

    Hi,

    I have just installed VC++7(Visual Studio.NET) on Windows 2000.

    However when I do New Project > Win32 Project > Console app, it creates a main function like this:

    int _tmain(int argc, _TCHAR* argv[])

    I realise that this is for multibyte programs, but I don't want that.

    How do I get it to create a normal Main function.

    Thanksssss
    ****

  2. #2
    Ya ya Baby!!!Me is Back
    Join Date
    Jul 2002
    Posts
    362
    Juste put : void main(){......

  3. #3
    Frenzied Member Zaei's Avatar
    Join Date
    Jul 2002
    Location
    My own little world...
    Posts
    1,710
    _TCHAR is only wide characters if you #define UNICODE. Otherwise, _TCHAR evaluates to char.

    Z.

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169

    Re: VC++7 Problem

    Originally posted by FantastichenEin
    Hi,

    I have just installed VC++7(Visual Studio.NET) on Windows 2000.

    However when I do New Project > Win32 Project > Console app, it creates a main function like this:

    int _tmain(int argc, _TCHAR* argv[])

    I realise that this is for multibyte programs, but I don't want that.

    How do I get it to create a normal Main function.

    Thanksssss
    No, it's for portable (in Windows terms) programs.

    Just use int main(int argc, const char **argv) instead. (Not void main, Daok )
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  5. #5
    Frenzied Member Zaei's Avatar
    Join Date
    Jul 2002
    Location
    My own little world...
    Posts
    1,710
    Originally posted by Daok
    Juste put : void main(){......
    And you shouldnt use void main().

    Z.

  6. #6

    Thread Starter
    Lively Member FantastichenEin's Avatar
    Join Date
    Mar 2000
    Location
    dairy
    Posts
    106
    Ok thanks for the replies.

    _tmain won't cross compile on linux, so I want to create a new project type that has int main instead. I know I could use Empty Project and insert the int main myself, but it would be nice to just be able to select it. Is this possible?

    cheers
    ****

  7. #7
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Maybe I'll port the tchar header to linux, it's really useful...
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  8. #8
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Then maybe I won't and just sit back because Win9x will die out and both the NT windows strain and UNIX support UNICODE.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  9. #9
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Heh. GNOME 2 uses Unicode completely as well
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  10. #10
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Even better.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

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