travail sur d02 ex02
This commit is contained in:
Binary file not shown.
@@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
NAME = karenFilter
|
NAME = karenFilter
|
||||||
|
|
||||||
CC = clang++
|
CC = c++
|
||||||
CFLAGS = -Wall -Wextra -Werror $(INCLUDES) -std=c++98 -g3
|
CFLAGS = -Wall -Wextra -Werror $(INCLUDES) -std=c++98
|
||||||
|
|
||||||
VPATH = $(D_SRCS)
|
VPATH = $(D_SRCS)
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
BIN
d02/ex02/fixed
BIN
d02/ex02/fixed
Binary file not shown.
@@ -3,18 +3,6 @@
|
|||||||
|
|
||||||
int main( void ) {
|
int main( void ) {
|
||||||
|
|
||||||
Fixed a(10);
|
|
||||||
Fixed b(5);
|
|
||||||
Fixed c;
|
|
||||||
|
|
||||||
std::cout << "a: " << a << '\n';
|
|
||||||
std::cout << "b: " << b << '\n';
|
|
||||||
if (a < b)
|
|
||||||
c = a;
|
|
||||||
else
|
|
||||||
c = b;
|
|
||||||
std::cout << "c: " << c << '\n';
|
|
||||||
|
|
||||||
// Fixed a;
|
// Fixed a;
|
||||||
// Fixed const b( Fixed( 5.05f ) * Fixed( 2 ) );
|
// Fixed const b( Fixed( 5.05f ) * Fixed( 2 ) );
|
||||||
//
|
//
|
||||||
@@ -28,5 +16,17 @@ int main( void ) {
|
|||||||
//
|
//
|
||||||
// std::cout << Fixed::max( a, b ) << std::endl
|
// std::cout << Fixed::max( a, b ) << std::endl
|
||||||
|
|
||||||
|
Fixed c(10);
|
||||||
|
Fixed d(5);
|
||||||
|
Fixed e;
|
||||||
|
|
||||||
|
std::cout << "c: " << d << '\n';
|
||||||
|
std::cout << "d: " << c << '\n';
|
||||||
|
if (c < d)
|
||||||
|
e = c;
|
||||||
|
else
|
||||||
|
e = d;
|
||||||
|
std::cout << "e: " << e << '\n';
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user