|
-
Nov 3rd, 2002, 05:31 AM
#1
Thread Starter
Lively Member
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
-
Nov 3rd, 2002, 10:16 AM
#2
Ya ya Baby!!!Me is Back
Juste put : void main(){......
-
Nov 3rd, 2002, 10:19 AM
#3
Frenzied Member
_TCHAR is only wide characters if you #define UNICODE. Otherwise, _TCHAR evaluates to char.
Z.
-
Nov 3rd, 2002, 10:19 AM
#4
Monday Morning Lunatic
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
-
Nov 3rd, 2002, 10:19 AM
#5
Frenzied Member
Originally posted by Daok
Juste put : void main(){......
And you shouldnt use void main().
Z.
-
Nov 4th, 2002, 04:48 AM
#6
Thread Starter
Lively Member
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
-
Nov 4th, 2002, 01:00 PM
#7
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.
-
Nov 4th, 2002, 01:01 PM
#8
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.
-
Nov 4th, 2002, 01:56 PM
#9
Monday Morning Lunatic
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
-
Nov 4th, 2002, 05:01 PM
#10
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|