d02 ex00 ok

This commit is contained in:
Hugo LAMY
2022-02-10 13:57:07 +01:00
parent 57663f5285
commit c287ea7c97
4 changed files with 116 additions and 18 deletions

View File

@@ -1,9 +1,36 @@
#include "Fixed.hpp"
#include <iostream>
int main() {
int main( void ) {
Fixed a;
Fixed b( a );
Fixed c;
c = b;
std::cout << a.getRawBits() << std::endl;
std::cout << b.getRawBits() << std::endl;
std::cout << c.getRawBits() << std::endl;
return 0;
}
// $> ./a.out
// Default constructor called
// Copy constructor called
// Copy assignment operator called // <-- This line may be missing depending on your implementation
// getRawBits member function called
// Default constructor called
// Copy assignment operator called
// getRawBits member function called
// getRawBits member function called
// 0
// getRawBits member function called
// 0
// getRawBits member function called
// 0
// Destructor called
// Destructor called
// Destructor called
// $>