Go back to Richel Bilderbeek's homepage.

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

 

 

 

 

 

(C++) short

 

short is a data type like int. Use GetMaxInt and GetMaxShort to compare their maximum values.

 

Avoid using short in a class interface; use int instead [1].

 

int main()
{
  short i = 3;
}

 

 

 

 

 

References

 

  1. John Lakos. Large-Scale C++ Software Design. 1996. ISBN: 0-201-63362-0. Chapter 9.2.1: 'Avoid using short in the interface; use int instead'

 

 

 

 

 

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

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict