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