teaching machines

CS 330 Lecture 21 – Object-oriented Programming

March 24, 2014 by . Filed under cs330, lectures, spring 2014.

Agenda

TODO

Theorize This

show show

What Does This Do?

  1. show
  2. show
  3. show

Polymorphism without Conditions

Code

Sizeof.cpp

#include <iostream>

class IntAndDouble {
  public:
    /* IntAndDouble() {} */
    /* int Get() { return i; } */
  private:
    /* double d; */
    int i;
    int j;
};

int main(int argc, char **argv) {
  std::cout << sizeof(IntAndDouble) << std::endl;
  return 0;
}

Haiku

show