For C++ Classes
Heade File:
#ifndef PERSON_H
#define PERSON_H
#include <string>
class Person {
private:
std::string name;
int age;
public:
Person(const std::string& name, int age);
void setName(const std::string& name);
std::string getName() const;
void setAge(int age);
int getAge() const;
void introduce() const;
};
#endif // PERSON_HHeader Implementation:
Main
Last updated