title: C++ function prototype declared in class definition in .h file but function not defined in .cpp
body: <p>I am trying to learn C++ by looking at actual code that works in the Arduino IDE.  </p>
  
  <p>I ran across a function prototype (readSensor) declared in a class in the .h file that was not defined in the .cpp file.  </p>
  
  <pre><code>class BME280Class
  {
   private:
     uint16_t readSensor(uint8_t command);
  </code></pre>
  
  <p>the function readSensor() was never called. The compiler compiled and produced an executable which ran.</p>
  
  <p>Can one have prototypes in .h files not defined in .cpp files and the compiler not care unless it is called?  It probably is not good practice is it?</p>