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 


what am I doing wrong?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam
View previous topic :: View next topic  
Author Message
paupav
Master Cheater
Reputation: 13

Joined: 15 Apr 2011
Posts: 314
Location: P. Sherman 42, Wallaby Way, Sydney

PostPosted: Thu Jul 11, 2013 1:52 pm    Post subject: what am I doing wrong? Reply with quote

also I've started to program again.


screenshot.png
 Description:
 Filesize:  122.57 KB
 Viewed:  1890 Time(s)

screenshot.png


Back to top
View user's profile Send private message
Innovation
Grandmaster Cheater
Reputation: 12

Joined: 14 Aug 2008
Posts: 617

PostPosted: Thu Jul 11, 2013 2:21 pm    Post subject: Reply with quote

Enclose "return a/b;" in curly braces. And there's nothing in the string to use the [] operator on.
Back to top
View user's profile Send private message
NooksCranny
Master Cheater
Reputation: -1

Joined: 28 Nov 2008
Posts: 373
Location: Occupation.

PostPosted: Thu Jul 11, 2013 4:01 pm    Post subject: Reply with quote

Boi why you trying to use symbol as an array when it's declared as a string?
Back to top
View user's profile Send private message
Innovation
Grandmaster Cheater
Reputation: 12

Joined: 14 Aug 2008
Posts: 617

PostPosted: Thu Jul 11, 2013 5:25 pm    Post subject: Reply with quote

NooksCranny wrote:
Boi why you trying to use symbol as an array when it's declared as a string?

A string is an array of characters.
Back to top
View user's profile Send private message
gogodr
I post too much
Reputation: 125

Joined: 19 Dec 2006
Posts: 2041

PostPosted: Thu Jul 11, 2013 7:49 pm    Post subject: Reply with quote

Google:
error: named return values are no longer supported
result: stack overflow.
someone with a similar problem
answer :
Code:
float divide(float a, float b){
return a/b;
}


also, you will get a null pointer exception on that switch. you gotta initialize your variables.
Back to top
View user's profile Send private message MSN Messenger
Innovation
Grandmaster Cheater
Reputation: 12

Joined: 14 Aug 2008
Posts: 617

PostPosted: Thu Jul 11, 2013 8:42 pm    Post subject: Reply with quote

gogodr wrote:
also, you will get a null pointer exception on that switch. you gotta initialize your variables.

Note that this is C++. There is no "null pointer exception," and you can do "functional style" initialization.
Back to top
View user's profile Send private message
gogodr
I post too much
Reputation: 125

Joined: 19 Dec 2006
Posts: 2041

PostPosted: Thu Jul 11, 2013 10:39 pm    Post subject: Reply with quote

Innovation wrote:
gogodr wrote:
also, you will get a null pointer exception on that switch. you gotta initialize your variables.

Note that this is C++. There is no "null pointer exception," and you can do "functional style" initialization.

ok excuse me, it will crash then.
anyways, he PMed me with the whole thing and I fixed it for him. I hope he writes me back asking how and why
Back to top
View user's profile Send private message MSN Messenger
InternetIsSeriousBusiness
Grandmaster Cheater Supreme
Reputation: 8

Joined: 12 Jul 2010
Posts: 1268

PostPosted: Thu Jul 11, 2013 11:40 pm    Post subject: Reply with quote

Paupav is a faggit
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam 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