Skip to main content
GameDev.net gamedev.net
🔒 Locked

return values

Started by dtmf2 Apr 10, 2002 at 7:36 PM 3 replies 350+ views
Original Post
dtmf2
dtmf2
int max(EnglishLength & A, EnglishLength & B) { int greater; if(A.isGreaterThan(B)) { greater = A.totalInches ; } else { greater = B.totalInches ; } return greater; } how can i return those values? it doesnt work presently because if type problems
this is my computer. There are many like it, but this one is mine.
barazor
barazor
what does EnglishLength::isGreaterThan() return? it has to be a number type, your best bet would be a bool
cearny
cearny
The problem *could* be that a macro with the name 'max' may already be defined.

[edited by - cearny on April 10, 2002 11:28:29 PM]
SabreMan
SabreMan
quote:
Original post by dtmf2
how can i return those values? it doesnt work presently because if type problems

WTF does "it doesn''t work" mean? By "type problems", you probably mean the compiler issues a diagnostic. If so, what''s the error message? Which line? There are no apparent type problems in your code sample.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.