Updated to default to 50k digits with no arguments, Makefile updates

This commit is contained in:
A.M. Rowsell 2024-07-23 12:07:02 -04:00
parent ec2a96b0ad
commit 4f738e5609
Signed by: amr
GPG key ID: 0B6E2D8375CF79A9
3 changed files with 4 additions and 3 deletions

View file

@ -24,6 +24,7 @@ depend: .depend
clean:
$(RM) $(OBJS)
$(RM) main
distclean: clean
$(RM) *~ .depend

View file

@ -1,7 +1,7 @@
CC=x86_64-w64-mingw32-gcc
CXX=x86_64-w64-mingw32-g++
RM=rm -f
CPPFLAGS=-Wall
CPPFLAGS=-Wall -std=gnu++17
LDFLAGS=-static
LDLIBS=-lm

View file

@ -5,8 +5,8 @@
int main(int argc, char **argv) {
int numDigits = 0;
if(argc < 2) {
std::cout << "Usage: spigot <numDigits>" << std::endl;
return -1;
numDigits = 50000;
std::cout << "Defaulting to 50000 digits..." << std::endl;
} else {
numDigits = std::atoi((const char *)argv[1]);
}