Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[HELP] Using Microsoft Visual C++ Express

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Heartless
I post too much
Reputation: 0

Joined: 03 Dec 2006
Posts: 2436

PostPosted: Sun Aug 12, 2007 8:27 pm    Post subject: [HELP] Using Microsoft Visual C++ Express Reply with quote

I've tried to make a Hello World program using this compiler but I'm still having trouble. I choose File -> Project -> Win32 -> Win32 Console Application. Then I Finish, and the Hello World.cpp has loaded. I change the Hello World.cpp from

Code:
// Hello World.cpp : Defines the entry point for the console application.
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}


to

Code:
#include <iostream>
using namespace std;
int main( void )
{
Cout << "Hello World!!!" ;
return 0;
}


When I try to compile and run it, I keep getting and error. Please Help.

I'll check up on this tread tomorrow morning.

_________________
What dosen't kill you, usually does the second time.
Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Sun Aug 12, 2007 8:30 pm    Post subject: Reply with quote

1. main takes argc and argv, and the CRT expects _tmain.
2. cout, not Cout. C++ is case sensitive, unlike the horrid language you're used to.
3. you have to look at the additional dependencies in stdafx caused by creating the project the way you did. You went through the wizard and told it to produce code, you're supposed to tell it to make your project empty, then go to "add file", then put your code in the new file. Or you can drop the whole IDE mess and compile using the command line tools. Much simpler that way. Faster also.
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Sun Aug 12, 2007 9:04 pm    Post subject: Reply with quote

y use Win32? Just Use a Emptry CLR Project. and add a Source File

anywayz yea. Cout must be cout

u also might wanna leave void out of the brackets and add either cin.get(): or system("pause"); right before return 0; so u are able to read what ur output is

if u wanna use Win32

go to stdafx.h and add #include <iostream> in there. because thats what stdafx.h is there for. to hold any libraries used in your program.

i'de just stick with Empty CLR Projects to begin with.

after that u can move onto CLR Console Apps or Win32

_________________
Back to top
View user's profile Send private message
DeltaFlyer
Grandmaster Cheater
Reputation: 0

Joined: 22 Jul 2006
Posts: 666

PostPosted: Mon Aug 13, 2007 12:36 am    Post subject: Reply with quote

lurc wrote:
Just Use a Emptry CLR Project.

Have you ever gone beyond hello world in C++/CLI?

_________________

Wow.... still working at 827... what's INCA thinking?
zomg l33t hax at this place (IE only). Over 150 people have used it, what are YOU waiting for?
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Mon Aug 13, 2007 8:26 am    Post subject: Reply with quote

yes....
_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites