C++ Pitfalls

No bounds checking; you can access invalid locations in arrays and no error will be generated! This can be especially hazardous to your data if you write to an invalid location!

Example:

  int iArray[10]; // defines a ten element array with valid indexes of 0 to 9
  int iError = iArray[23]; // no error is generated and we read "random" data!
  iArray[17] = 46; // no error is generated and we just corrupted some other data!