diff options
author | Simon Warta <[email protected]> | 2015-12-08 19:56:19 +0100 |
---|---|---|
committer | Simon Warta <[email protected]> | 2015-12-08 22:02:28 +0100 |
commit | 368d087e3973db9d8c5b70443d31c27c03dfdbef (patch) | |
tree | 9059a52c70eee8b825d9fd7fa14194940853b86a /src/cmd/factor.cpp | |
parent | 53fca25da331d168b0433ba2e41b06aae9d17f5c (diff) |
Replace C interfaces in cli apps with C++ interfaces
Diffstat (limited to 'src/cmd/factor.cpp')
-rw-r--r-- | src/cmd/factor.cpp | 8 |
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; |