Select Git revision
Forked from
cp1_ws19 / cpp_introduction
Source project has a limited visibility.
-
Kevin Höllring authoredKevin Höllring authored
sample_3.h 664 B
#ifndef __SAMPLE_3_H__
#define __SAMPLE_3_H__
#include <string>
namespace city {
// A custom type with a fixed number of permitted values
enum HouseColor {
red,
blue,
green,
white,
black
};
// A custom type with data fields
struct House {
// Our custom color
HouseColor color;
// A house number
uint32_t number;
// The name of the owner
std::string owner;
};
// A function to illustrate call by value
void copy_repaint(House torepaint);
// A function to illustrate call by referene
void copy_free_repaint(House &torepaint);
// A function to print out a description of the house
void describe_house(House &house);
};
#endif