(C++) short

February 24, 2017 · View on GitHub

 

 

 

 

 

(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'

 

 

 

 

 

 

Contents

  1. 1int main() { short i = 3; }
  2. 2References