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++] Trouble with a tutorial

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Cyrusmages
Grandmaster Cheater Supreme
Reputation: 0

Joined: 22 Feb 2009
Posts: 1358

PostPosted: Sat Mar 28, 2009 8:33 pm    Post subject: [C++] Trouble with a tutorial Reply with quote

Well, I wanted to learn C++, the entire language, because as computers are rapidly becoming the present, and not the things of the future that they once more, I realize that knowing more about computers can help me out a lot.

I looked up tutorials on google, and the first link was this:

http://www.cplusplus.com/doc/tutorial/program_structure.html

Now, the tutorial looks really good and it seems really understandable, yet when I copy + Paste the code into my program (exactly as they have it), it says I have build errors.

Could you tell me of a better site or something that might help me with this website?

_________________


If you have a mic, add me and tell me that you're from CEF or I won't add you (probably)
Back to top
View user's profile Send private message MSN Messenger
VolatileAce
Cheater
Reputation: 0

Joined: 19 Mar 2009
Posts: 30
Location: 0001001100110111

PostPosted: Sat Mar 28, 2009 10:02 pm    Post subject: Reply with quote

If you've never had programming experience base, try to get started with another language first, especially when your learning it by yourself. C++ is a bit advanced for a beginner. This is personal opinion so yea. (Pss go take Java)
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sat Mar 28, 2009 10:37 pm    Post subject: Reply with quote

Post the error... can't read minds.
Back to top
View user's profile Send private message
VolatileAce
Cheater
Reputation: 0

Joined: 19 Mar 2009
Posts: 30
Location: 0001001100110111

PostPosted: Sun Mar 29, 2009 1:14 am    Post subject: Reply with quote

Again, Cyrusmages, I can't answer PMs so I'll do it here >_>

Just add this chuck of code before int main()


Edit the 40in line 4 to whatever number you want to cut to next line.
Code:
void append(string s){
   static int count = 0;
   for(int i = -1; ++i < s.length(); cout << s.at(i))
      if(count++ % 40 == 0 && count != 1)
         cout << endl;
}


And then in your code, whenever you do cout, change it to append, for example:
Code:
cout << "Hi my name is Bob." << endl;

should be changed to
Code:
append("Hi my name is Bob");
Back to top
View user's profile Send private message
Cyrusmages
Grandmaster Cheater Supreme
Reputation: 0

Joined: 22 Feb 2009
Posts: 1358

PostPosted: Sun Mar 29, 2009 7:26 am    Post subject: Reply with quote

VolatileAce wrote:
Again, Cyrusmages, I can't answer PMs so I'll do it here >_>

Just add this chuck of code before int main()


Edit the 40in line 4 to whatever number you want to cut to next line.
Code:
void append(string s){
   static int count = 0;
   for(int i = -1; ++i < s.length(); cout << s.at(i))
      if(count++ % 40 == 0 && count != 1)
         cout << endl;
}


And then in your code, whenever you do cout, change it to append, for example:
Code:
cout << "Hi my name is Bob." << endl;

should be changed to
Code:
append("Hi my name is Bob");


I never PMed you on this XD

Eh, I'll just stick with another programming language. Just having someone give me the code teaches me pratically nothing. As you've suggested and as someone else suggested, I'll just learn Java first.

What's the best site you know with good tutorials for Beginner - Advanced?

_________________


If you have a mic, add me and tell me that you're from CEF or I won't add you (probably)
Back to top
View user's profile Send private message MSN Messenger
VolatileAce
Cheater
Reputation: 0

Joined: 19 Mar 2009
Posts: 30
Location: 0001001100110111

PostPosted: Sun Mar 29, 2009 11:23 am    Post subject: Reply with quote

Cyrusmages wrote:
I never PMed you on this XD

Eh, I'll just stick with another programming language. Just having someone give me the code teaches me pratically nothing. As you've suggested and as someone else suggested, I'll just learn Java first.

What's the best site you know with good tutorials for Beginner - Advanced?


Quote:
From: Cyrusmages
To: VolatileAce
Posted: Sat Mar 28, 2009 9:45 am
Subject: Another question, lol Quote message
With that code, I put in thousands of IDs (FINGERS HURT) and I realized that 30 or 40 look messed up in the console because I add so much into it.

Is there a way to make it to where

Me
Console

Hi
Wassup
How're you?
You doing good?
Shut the fuck up
You got it, sir.
Sorry, sir.
You can fuck my wife, sir.

To where it doesn't roll over like this

Hi
Wassup How're you You doing go->Rollsovertonextline
od?

I tried a few things but I always ended up failing it or getting build errors. Please reply in the topic if you have any free time.

_________________
Xbox Live Gamertag: Cyrusthebeast

If you have a mic, add me and tell me that you're from CEF or I won't add you (probably)
Back to top
View user's profile Send private message
Cyrusmages
Grandmaster Cheater Supreme
Reputation: 0

Joined: 22 Feb 2009
Posts: 1358

PostPosted: Sun Mar 29, 2009 11:30 am    Post subject: Reply with quote

That was for rolling over, not help with a tutorial, hence me saying "I didn't PM you on this. Razz
_________________


If you have a mic, add me and tell me that you're from CEF or I won't add you (probably)
Back to top
View user's profile Send private message MSN Messenger
VolatileAce
Cheater
Reputation: 0

Joined: 19 Mar 2009
Posts: 30
Location: 0001001100110111

PostPosted: Sun Mar 29, 2009 12:42 pm    Post subject: Reply with quote

java.sun. com/docs/books/tutorial/
Back to top
View user's profile Send private message
Cyrusmages
Grandmaster Cheater Supreme
Reputation: 0

Joined: 22 Feb 2009
Posts: 1358

PostPosted: Sun Mar 29, 2009 12:44 pm    Post subject: Reply with quote

VolatileAce wrote:
java.sun. com/docs/books/tutorial/


If I learn Java, will I be able to code stuff like my own games?

_________________


If you have a mic, add me and tell me that you're from CEF or I won't add you (probably)
Back to top
View user's profile Send private message MSN Messenger
`unknown
Grandmaster Cheater
Reputation: 0

Joined: 20 Nov 2006
Posts: 658
Location: You lost the game.

PostPosted: Sun Mar 29, 2009 1:20 pm    Post subject: Reply with quote

Java has a weird syntax imo, but I guess overall it would be easier to learn. If your still confused on java try learning something like php, it will teach you the basic syntax for C++ (if-then-else, for(each)/while loops, functions, classes, etc.) and then you can take another shot at it.
Back to top
View user's profile Send private message MSN Messenger
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Sun Mar 29, 2009 1:57 pm    Post subject: Reply with quote

C first, then C++. You aren't even using the most key component of C++, which are classes, so stick to C for now.
_________________
Back to top
View user's profile Send private message
rapion124
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Mar 2007
Posts: 1095

PostPosted: Mon Mar 30, 2009 6:43 pm    Post subject: Reply with quote

Instead of reading books, first understand how your compiler works. Then try to learn the language.
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