Ive got a class which only does what its supposed to do when objects of its type are destructed RAII concept I

iterator)’

v; v+= 1,2; cout (accumulate(v.begin(),v.end(),0)/distance(v.begin(),v.end()));}

1

i meant, the useage of the function will only be of “arrays” containing integers and floats

yeah, so?
especially since that’s the case, make it a double

i might as well make a specialization for it then

specialization for WHAT?

int and double

the only case where you’d want a non-double return is if you have a custom mathematical object
afaict

that and float

Question about overloading , if I do ABCD, is this always going to be ((A.operator(B)).operator(C)).operator(D) (assuming operator returns the same type as A,B,C,D)

yargh

I define a class as Type *foo; in the global namespace. In one function, i create it with foo = new Type(args); .. Later, in another function, I try to call it, yet it’s like I never initialized it.
Am I doing something stupid or are there adverse elements at effect here?

In the same namespace?

!give hydrant operator precedence

er, in the same file?

http://jcatki.no-ip.org/fncpp/OperatorPrecedence

it works from the left to the right

all operators of the same type are left associative correct (not a precedence issue) right?
yeah ok

what?

is the other function in the same file? Does the other function also include the class instance declaration?

associativity isnt precedence

read the damned link EvanR2 and you’ll see it has the associativity listed

k, thanks, I just wanted to double check

ok

Inside, yes
I can nopaste the whole file if you want, but some it it’s kind of lengthy

my “what” was at “all operators of the same type” — what do you mean by that?

Is the second function declared before the object?

includes, defines, functions
s/defines/declares

Sanity check: I define a class as Type *foo; — what do you mean by Type *foo as a class type?
that makes no sense.

modelMD2 *leftrightwall;

ohh
ok
let’s see the file

http://rafb.net/p/Yyj2wa51.html — On line 61, I initialize guideLine (declared on line 45). I do a debug check in the class and it tells me some 257 coords are generated. This is good.
zip over to line 147, I call update() for the first time, and suddenly I have 0 coords, and it throws an exception

are you sure it’s being called in the right order?

Yes, debugging checks confirm this

do you have another floor in gs_song

*
To prove that you're not a bot, enter this code
Anti-Spam Image

Comments are closed.