fichiers organisés
This commit is contained in:
29
d06/ex00/srcs/checkDouble.cpp
Normal file
29
d06/ex00/srcs/checkDouble.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <cctype> // isdigit()
|
||||
#include "color.h"
|
||||
|
||||
//Char toChar(str) {
|
||||
//
|
||||
//}
|
||||
|
||||
bool isDouble(std::string str) {
|
||||
if (str.length() == 3)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool checkDouble(std::string str) {
|
||||
|
||||
// double d;
|
||||
|
||||
std::cout << "double\n";
|
||||
|
||||
if (!isDouble(str))
|
||||
return false;
|
||||
|
||||
// d = toDouble(str);
|
||||
// std::cout << "double"RESET" equal to : "B_CYAN << d << RESET << "\n";
|
||||
// fromDouble(d);
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user