Skip to content

Latest commit

 

History

History
11 lines (10 loc) · 545 Bytes

File metadata and controls

11 lines (10 loc) · 545 Bytes

Data types

In C++, a variable can be converted from one type to another using four casts, one of them being static cast, e.g. static_cast<double>(outcomes[j])/trials

  • int: Integer, 4 bytes long
  • float: float
  • double: longer float
  • char: character
  • unsigned: only positive
  • long: use more bytes, can use on int and double
  • short: use less bytes, can use on int
  • void: no input or output, e.g. int main(void) means return an int, no input arguments