blob: 61f3b471b78b2a890c602219494b14642bad3f0c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Pony.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/04/13 09:06:06 by charles #+# #+# */
/* Updated: 2020/04/13 09:06:11 by charles ### ########.fr */
/* */
/* ************************************************************************** */
#include <iostream>
#include "Pony.hpp"
Pony::Pony(int w, int s)
{
weight = w;
max_speed = s;
}
void Pony::say_hello()
{
std::cout << "Hi, I'm a pony, I weight " << weight
<< " and my speed limit is " << max_speed << std::endl;
}
void Pony::run()
{
for (int i = 0; i < max_speed; i++)
std::cout << "I'm running really fast at " << i << ", look at me!" << std::endl;
}
|