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] Getting a random number in C++
Goto page Previous  1, 2
 
Post new topic   This topic is locked: you cannot edit posts or make replies.    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Wed Jul 30, 2008 2:31 pm    Post subject: Reply with quote

_void_ wrote:
Why would there be a ";" at the end of a function? You didn't define "base". You forget to add a ";" after your function/api call -.-

P.S Writing a function in one line doesn't make you look pro.


What's funny is he thought inlining a function meant to write it in one line. It shows just how clueless he is. Smile
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Wed Jul 30, 2008 2:36 pm    Post subject: Reply with quote

Flyte wrote:
_void_ wrote:
Why would there be a ";" at the end of a function? You didn't define "base". You forget to add a ";" after your function/api call -.-

P.S Writing a function in one line doesn't make you look pro.


What's funny is he thought inlining a function meant to write it in one line. It shows just how clueless he is. Smile


Oh hahaha I've must have over read.
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Wed Jul 30, 2008 3:12 pm    Post subject: Reply with quote

GMZorita wrote:
Jani wrote:
GMZorita: I suggest inlining your function.. And "base" is a bit confusing, because we're talking about numbers..

I not even looked at it i just did one rlly fast. and yeah sure why not inline.

Code:

int getrandnumber(int max,int min) {return (rand() % max) + base)};


Wow bro great job on the inlining, the speed boost must be tremendous without having to execute those extra lines
Back to top
View user's profile Send private message
Nuclear898
Grandmaster Cheater Supreme
Reputation: 0

Joined: 04 Jun 2006
Posts: 1597
Location: The Netherlands

PostPosted: Wed Jul 30, 2008 4:02 pm    Post subject: Reply with quote

Inlining means that instead of max and min being declared first, and then accessed again later to be assigned a value, that they can both be done at the same time?
Code:
__inline
?
Back to top
View user's profile Send private message
Noz3001
I'm a spammer
Reputation: 26

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

PostPosted: Wed Jul 30, 2008 5:07 pm    Post subject: Reply with quote

Oh dear.
http://www.greenend.org.uk/rjk/2003/03/inline.html
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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