aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmd/factor.cpp
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2015-12-08 19:56:19 +0100
committerSimon Warta <[email protected]>2015-12-08 22:02:28 +0100
commit368d087e3973db9d8c5b70443d31c27c03dfdbef (patch)
tree9059a52c70eee8b825d9fd7fa14194940853b86a /src/cmd/factor.cpp
parent53fca25da331d168b0433ba2e41b06aae9d17f5c (diff)
Replace C interfaces in cli apps with C++ interfaces
Diffstat (limited to 'src/cmd/factor.cpp')
-rw-r--r--src/cmd/factor.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/factor.cpp b/src/cmd/factor.cpp
index 5ea53478d..d2c0a2df5 100644
--- a/src/cmd/factor.cpp
+++ b/src/cmd/factor.cpp
@@ -122,17 +122,17 @@ std::vector<BigInt> factorize(const BigInt& n_in,
return factors;
}
-int factor(int argc, char* argv[])
+int factor(const std::vector<std::string> &args)
{
- if(argc != 2)
+ if(args.size() != 2)
{
- std::cout << "Usage: " << argv[0] << " <integer>" << std::endl;
+ std::cout << "Usage: " << args[0] << " <integer>" << std::endl;
return 1;
}
try
{
- BigInt n(argv[1]);
+ BigInt n(args[1]);
AutoSeeded_RNG rng;