Skip to content

Instantly share code, notes, and snippets.

@vermiculus
Created February 17, 2013 19:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vermiculus/4972960 to your computer and use it in GitHub Desktop.
Save vermiculus/4972960 to your computer and use it in GitHub Desktop.
Basic OOC
#include "Point.h"
struct LineModel {
Point *start;
Point *end;
}
void LineLength(struct LineModel*);
void MakeLine(struct LineModel*);
typedef Line struct LineModel*;
#include "Point.h"
void MakePoint(Point* obj, int x, int y) {
obj->x = x;
obj->y = y;
}
struct PointModel {
int x;
int y;
};
void MakePoint(struct PointModel*, int, int);
typedef Point struct PointModel;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment