-2

What does the followin way to write a parameter mean?

int CGame::iGetPlayerABSStatus(int iWhatH, int iRecvH, BOOL & bTransparentInvi)

This part: "BOOL & bTransparentInvi"

I took this from old source code of a visual 6.0 project.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131

1 Answers1

1

It simply means argument bTransparentInvi is a reference to the BOOL data type.

Don't get confused with the placement of the & operator. It's the same as writing BOOL& bTransparentInvi.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
P0W
  • 46,614
  • 9
  • 72
  • 119
  • I still do not understand, which means that the operator is in the middle of both? What is that way of programming used for? – Martin Lopez Jan 28 '17 at 06:21
  • 1
    @MartinLopez Please refer reference usage from your favorite C++ book. http://stackoverflow.com/q/388242/1870232 might help, if you don't have one. – P0W Jan 28 '17 at 06:24
  • @MartinLopez Stack Overflow is not a good place to learn the fundamentals of the language. As P0W says - get a book. – Martin Bonner supports Monica Jan 28 '17 at 08:06