-
Notifications
You must be signed in to change notification settings - Fork 1
File Structure
Luke Pring edited this page Mar 15, 2025
·
2 revisions
The program is structured into 📁include/ and 📁src/ folders and their corresponding files where code for each section of the code should go. The main.cpp file is in the root directory and ties the program together.
The .hpp files in 📁include/ should contain only declarations, not function implementations.
For example: pets.hpp
#pragma once
#include <string>
class Pet {
private:
std::string name;
std::string breed;
int age;
...
public:
Pet(std::string petName, std::string petBreed, int petAge, ...);
void displayInfo();
...
};
The functions are declared here, but the actual function code should be inside the pets.cpp file in 📁src
By Luke Pring and Jack Turner for the Software Development 2 module at University of Roehampton, London.