-3

I want to implement a function with a parameter that will receive a string result:

bool function (entry parameter, std::ostringstream & var)

I'm not sure about what it is, pointer ?

Should I do something special about it or just: var << result ?

The return value is boolean but we will need var after

Shreevardhan
  • 12,233
  • 3
  • 36
  • 50
StayAlone
  • 41
  • 6

1 Answers1

1

& means it is a reference, not a pointer. See Andrew's comment link. You do not need to delete var, if that is what you mean by "something special." Given the method signature you provided, the code:

var << result;

should work just fine, assuming "result" is something sane. If you need more information, you may need to post a MCVE.

Community
  • 1
  • 1
Moby Disk
  • 3,761
  • 1
  • 19
  • 38