cpp06/ex00/Main.cpp

24 lines
552 B
C++

#include "ScalarConverter.hpp"
int main(int argc, char **argv)
{
std::cout << std::endl;
if (argc < 2)
std::cout << "Usage: ./convert <value_to_cast1> <value_to_cast2> ..." << std::endl;
int i = 1;
while (argv[i])
{
std::cout << "############## OUTPUT " << i << " ##############" << std::endl;
std::cout << "user input:\t\"" << argv[i] << "\"" << std::endl;
if (argv[i][0])
ScalarConverter::convert(argv[i++]);
else
std::cout << "Argument " << i++ << " is empty." << std::endl;
std::cout << std::endl;
}
return (0);
}