cpp/cpp02/ex00/Fixed.hpp
Alexandre POMMIER 8543b33348 correct cpp00
2022-07-23 11:58:33 +02:00

36 lines
1.2 KiB
C++

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Fixed.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/06/22 00:58:18 by apommier #+# #+# */
/* Updated: 2022/07/22 13:23:04 by apommier ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef FIXED_HPP
# define FIXED_HPP
#include <iostream>
class Fixed {
public:
Fixed();
Fixed(const Fixed&);
~Fixed();
int getRawBits(void) const;
void setRawBits(int const raw);
private:
int _value;
const static int _fraction = 8;
};
std::ostream &operator<<(std::ostream &out, const Fixed &nbr);
#endif