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 


C++ Starting
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Mon Aug 11, 2008 7:19 am    Post subject: Reply with quote

Because it's C++ not C. And fullyawesome stop saying that people should learn vb.net in every thread like this. It's exactly the opposite.
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Mon Aug 11, 2008 7:40 am    Post subject: Reply with quote

Jani, screw you XD. That's what i get for typing it in the reply box.
Back to top
View user's profile Send private message MSN Messenger
dEEznutz
Grandmaster Cheater
Reputation: 0

Joined: 29 Nov 2007
Posts: 514

PostPosted: Mon Aug 11, 2008 9:54 am    Post subject: Reply with quote

Jani wrote:
noz3001 wrote:
Go away and stop trying to teach people bad things Sad.

Code:
#include <iostream>

int main( void )
{
       std::cout << "Hello World" << endl;
       return 0;
}
Sorry to say that your code doesn't even compile Razz
Code:
std::endl;

:/ Still not working, completely erased my source and filled the blank page with this one and I get new errors now.
Code:
#include <iostream>

#include "stdafx.h"

int main( void )
{
   std::cout << "Hello World" << std::endl;
       return 0;
}


Errors : error C2653: 'std' : is not a class or namespace name
error C2065: 'cout' : undeclared identifier

_________________
Learning C++
Back to top
View user's profile Send private message
Zand
Master Cheater
Reputation: 0

Joined: 21 Jul 2006
Posts: 424

PostPosted: Mon Aug 11, 2008 10:09 am    Post subject: Reply with quote

Screw your compiler.
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 11, 2008 10:21 am    Post subject: Reply with quote

Wtf?
What Compiler/IDE are you using?
What Project type did you choose?

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

Joined: 29 Nov 2007
Posts: 514

PostPosted: Mon Aug 11, 2008 10:23 am    Post subject: Reply with quote

lurc wrote:
Wtf?
What Compiler/IDE are you using?
What Project type did you choose?

I'm using Microsoft Visual 2008 Express edition, and the project type I picked Win32 project.

_________________
Learning C++
Back to top
View user's profile Send private message
Zand
Master Cheater
Reputation: 0

Joined: 21 Jul 2006
Posts: 424

PostPosted: Mon Aug 11, 2008 10:42 am    Post subject: Reply with quote

Win32 project what??

Check empty project also.

Make sure you're using C++ build environment. Very Happy
Back to top
View user's profile Send private message
dEEznutz
Grandmaster Cheater
Reputation: 0

Joined: 29 Nov 2007
Posts: 514

PostPosted: Mon Aug 11, 2008 10:53 am    Post subject: Reply with quote

Zand wrote:
Win32 project what??

Check empty project also.

Make sure you're using C++ build environment. Very Happy

I'm trying empty project, just don't know how to get the page up to put the source in lol.

Edit: nvm, found out how to do that.

double edit: Hmm, I think it's working now because when I clicked start debugging it opened up a CMD and I got no errors. However, the cmd closed to fast for me to see anything. Is this what supposed to happen?

_________________
Learning C++
Back to top
View user's profile Send private message
Zand
Master Cheater
Reputation: 0

Joined: 21 Jul 2006
Posts: 424

PostPosted: Mon Aug 11, 2008 11:04 am    Post subject: Reply with quote

Yes.

Put
Code:

std::cin.sync();
std::cin.ignore();


before return 0;
Back to top
View user's profile Send private message
dEEznutz
Grandmaster Cheater
Reputation: 0

Joined: 29 Nov 2007
Posts: 514

PostPosted: Mon Aug 11, 2008 11:08 am    Post subject: Reply with quote

Zand wrote:
Yes.

Put
Code:

std::cin.sync();
std::cin.ignore();


before return 0;

Cool, it's working now Smile. Are those two lines always supposed to be put before "return 0;"?

_________________
Learning C++
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 11, 2008 11:11 am    Post subject: Reply with quote

They just stop the command line and wait for user-input.

sync - Synchronize input buffer with source of characters
ignore - Extract and discard characters

(Taken from cplusplus)

_________________


Last edited by lurc on Mon Aug 11, 2008 11:12 am; edited 1 time in total
Back to top
View user's profile Send private message
dEEznutz
Grandmaster Cheater
Reputation: 0

Joined: 29 Nov 2007
Posts: 514

PostPosted: Mon Aug 11, 2008 11:12 am    Post subject: Reply with quote

lurc wrote:
They just stop the command line and wait for user-input.

Oh, thanks Very Happy

_________________
Learning C++
Back to top
View user's profile Send private message
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Mon Aug 11, 2008 12:55 pm    Post subject: Reply with quote

dEEznutz wrote:

double edit: Hmm, I think it's working now because when I clicked start debugging it opened up a CMD and I got no errors. However, the cmd closed to fast for me to see anything. Is this what supposed to happen?


Or you can just use

Sleep ();
Back to top
View user's profile Send private message Send e-mail
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Mon Aug 11, 2008 1:50 pm    Post subject: Reply with quote

kitterz wrote:
dEEznutz wrote:

double edit: Hmm, I think it's working now because when I clicked start debugging it opened up a CMD and I got no errors. However, the cmd closed to fast for me to see anything. Is this what supposed to happen?


Or you can just use

Sleep ();


Er no, don't do this. It's just going to sit there, stalled and unresponsive until it's time is up.
Back to top
View user's profile Send private message
dEEznutz
Grandmaster Cheater
Reputation: 0

Joined: 29 Nov 2007
Posts: 514

PostPosted: Mon Aug 11, 2008 2:06 pm    Post subject: Reply with quote

slovach wrote:
kitterz wrote:
dEEznutz wrote:

double edit: Hmm, I think it's working now because when I clicked start debugging it opened up a CMD and I got no errors. However, the cmd closed to fast for me to see anything. Is this what supposed to happen?


Or you can just use

Sleep ();


Er no, don't do this. It's just going to sit there, stalled and unresponsive until it's time is up.

Okay, thanks Razz

_________________
Learning C++
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
Goto page Previous  1, 2, 3, 4  Next
Page 2 of 4

 
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