Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) operator/=

 

operator/= is the operator to divide a variable's value by a certain value, without making a copy.

 

#include <cassert>

int main()
{
  double x = 1.0;
  x/=5.0;
  assert(x == 0.2);
}

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict