feat: finishing the exercice 00 of the cpp02
This commit is contained in:
parent
bbc496d868
commit
ff72109a4e
4 changed files with 223 additions and 0 deletions
31
cpp02/ex00/Fixed.hpp
Normal file
31
cpp02/ex00/Fixed.hpp
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* Fixed.hpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/12/21 19:30:23 by rparodi #+# #+# */
|
||||
/* Updated: 2024/12/23 14:32:05 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef FIXED_HPP
|
||||
#define FIXED_HPP
|
||||
|
||||
#include <iostream>
|
||||
|
||||
class Fixed {
|
||||
public:
|
||||
Fixed();
|
||||
Fixed(const Fixed ©);
|
||||
~Fixed();
|
||||
int getRawBits();
|
||||
void setRawBits(const int value);
|
||||
Fixed & operator = (const Fixed &value);
|
||||
private:
|
||||
int _fixed_value;
|
||||
static const int _fractionnal = 8;
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue