Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualParadigm Shifter

Posted 20 March 2013 - 03:17 PM

It doesn't say const anywhere in the code!

 

Presumably it is moaning that you are passing an unnamed temporary value (i.e. return value from f5()) as a reference parameter which isn't legal (but may be allowed with a warning) since you don't want to be modifying an unnamed temporary value by accident.

 

Try doing

 

X myX = f5();

 

f7(myX);

 

instead, that should work...

 

EDIT: And we aren't psychic (try the math & psychics forum instead for that) please post the full error message and compiler you are using next time kthx ;)


#2Paradigm Shifter

Posted 20 March 2013 - 03:16 PM

It doesn't say const anywhere in the code!

 

Presumably it is moaning that you are passing an unnamed temporary value (i.e. return value from f5()) as a reference parameter which isn't legal (but may be allowed with a warning) since you don't want to be modifying an unnamed temporary value by accident.

 

Try doing

 

X myX = f5();

 

f7(myX);

 

instead, that should work...

 

EDIT: And we aren't psychic please post the full error message and compiler you are using next time kthx ;)


#1Paradigm Shifter

Posted 20 March 2013 - 03:12 PM

It doesn't say const anywhere in the code!

 

Presumably it is moaning that you are passing an unnamed temporary value (i.e. return value from f5()) as a reference parameter which isn't legal (but may be allowed with a warning) since you don't want to be modifying an unnamed temporary value by accident.

 

Try doing

 

X myX = f5();

 

f7(myX);

 

instead, that should work...

 

 


PARTNERS