Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
4003CEM-Exam-Practise/Header Files/header.h
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
16 lines (12 sloc)
560 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once // ensures that the header file is only included once and not all the time during compiling | |
#ifndef HEADER // if not defined | |
#define HEADER // define HEADER | |
#include <iostream> | |
namespace Header { // defines the header for the main file to "using namespace " stuff | |
class MyHeader { // define header | |
public: // public access identifier | |
std::string name = "this is my header name"; // makes a variable called name | |
int age = 19; // makes a variable assigned to int 19 | |
}; | |
} | |
#endif // end the ifndef at line 3 |