C_CPP/02_MENT/main_02_MENT.cpp

32 lines
613 B
C++

// file: main_02_MENT.cpp
// THIS IS C++, use clang++
#include "../helpers/println.hpp"
#include <iostream>
struct PascalString{
int length; // number of chars used
char characters[256]; // chars of some character string
};
int hexDigitToInt(char hexDigit){
int value = -1;
// TBD
return value;
}
int hexStringToInt(PascalString binaryDigits){
int returnValue = -1;
return returnValue;
}
int main(int argc, char** argv, char** envp){
PascalString s = {3, '1', '0', '0'};
PascalString s2 = {4, 'f', 'f', 'f', 'f'};
println(hexStringToInt(s));
println(hexStringToInt(s2));
return 0;
}