d06 change test output
This commit is contained in:
@@ -22,10 +22,10 @@ bool isChar(std::string str) {
|
||||
bool checkChar(std::string str) {
|
||||
char c;
|
||||
|
||||
if (str.length() != 1 || isdigit(str[0]))
|
||||
if (!isChar(str))
|
||||
return false;
|
||||
c = str[0];
|
||||
|
||||
c = str[0];
|
||||
std::cout << B_CYAN << c << B_YELLOW " char" RESET "\n";
|
||||
fromChar(c);
|
||||
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
#include <string>
|
||||
#include "convert.h"
|
||||
|
||||
// f[] : is an array
|
||||
// *f[] : is an array of pointers
|
||||
// (*f[])() : is an array of pointers to functions with no parameters
|
||||
// (*f[])(str) : is an array of pointers to functions with parameter str
|
||||
// see :
|
||||
// https://stackoverflow.com/questions/31643245/declaring-an-array-of-functions-of-type-void-c
|
||||
bool (*checkFunc[])(std::string str) =
|
||||
{
|
||||
checkChar,
|
||||
|
||||
Reference in New Issue
Block a user