Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (15 sloc) 404 Bytes
#include <iostream>
#include <string>
class Bonjour
{
// Private attribute
std::string m_msg;
public:
// Constructor
Bonjour(std::string msg):m_msg(msg) { }
// Methods
void greet() { std::cout << m_msg << std::endl; }
// Getter/Setter functions for the attribute
void set_msg(std::string msg) { this->m_msg = msg; }
std::string get_msg() const { return m_msg; }
};