fichiers organisés
This commit is contained in:
30
d06/ex00/srcs/checkFloat.cpp
Normal file
30
d06/ex00/srcs/checkFloat.cpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <cctype> // isdigit()
|
||||
#include "color.h"
|
||||
|
||||
//Char toChar(str) {
|
||||
//
|
||||
//}
|
||||
|
||||
bool isFloat(std::string str) {
|
||||
if (str.length() == 4)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool checkFloat(std::string str) {
|
||||
|
||||
// float f;
|
||||
|
||||
std::cout << "in char\n";
|
||||
|
||||
if (!isFloat(str))
|
||||
return false;
|
||||
|
||||
// f = toFloat(str);
|
||||
// std::cout << "float"RESET" equal to : "B_CYAN << f << RESET << "\n";
|
||||
// fromFloat(f);
|
||||
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user