2024-01-20 19:19:02 -05:00
|
|
|
// skeleton.cpp
|
|
|
|
|
2024-01-20 17:08:20 -05:00
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
class Person
|
|
|
|
{
|
|
|
|
std::string name;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
Person(std::string name)
|
|
|
|
{
|
|
|
|
this->name = name;
|
|
|
|
}
|
|
|
|
|
|
|
|
void greet()
|
|
|
|
{
|
|
|
|
std::cout << "Hello, my name is " << this->name << "!" << std::endl;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
int main(int argc, char* argv[])
|
|
|
|
{
|
|
|
|
auto person = new Person("Madison");
|
|
|
|
person->greet();
|
|
|
|
delete person;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|