adding cs142 code

This commit is contained in:
dm
2016-04-06 20:45:34 -07:00
parent 552d456d53
commit 8e52ce1982
174 changed files with 14064 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
#include <string>
#include <iostream>
#include <ostream>
#include <sstream>
using namespace std;
#pragma once
class person
{
private:
string name;
int age;
public:
person(){};
person(const string name, int age): name(name), age(age){};
string as_string() const;
void populate_data();
// you can define and declare in a header too:
inline int dummy_function() { return 42; };
// this is what allows us to do cout << my_person;
friend ostream & operator<<(ostream & os, const person & e);
};