maniackplanet/IDATest/IDATest.cpp

28 lines
405 B
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// IDATest.cpp : définit le point d'entrée pour l'application console.
//
#include "stdafx.h"
#include <iostream>
class Toto {
public:
int age;
Toto(int _age) : age(_age) {
std::cout << "Toto::Toto(int)" << std::endl;
};
void grandir(int nA) {
std::cout << "Toto::grandir(int)" << std::endl;
age += nA;
}
};
int main()
{
Toto a = Toto(5);
a.grandir(10);
std::cin.get();
return 0;
}