spigotcpp/main.cpp

20 lines
468 B
C++
Raw Permalink Normal View History

#include <iostream>
#include <cstdlib>
#include "Spigot.hpp"
int main(int argc, char **argv) {
int numDigits = 0;
if(argc < 2) {
numDigits = 50000;
std::cout << "Defaulting to 50000 digits..." << std::endl;
} else {
numDigits = std::atoi((const char *)argv[1]);
}
Spigot *piSpigot = new Spigot(numDigits);
for(int i = 0; i < numDigits; i++) {
piSpigot->pump();
}
2023-06-26 04:22:24 +00:00
std::cout << std::endl;
return 0;
}