我使用docopt來解析python中的命令行輸入。我有我的文檔字符串: """
Usage:
docoptTest.py [options]
Options:
-h --help show this help message and exit
-n --name <name> The name of the specified person
"""
我的代碼如下。這是C++代碼。 此代碼在兩個數字中進行通用劃分。 例如,如果輸入是18,24,則輸出是2,2,2,3,3。 但我只想輸出2和3。 我無法修復它。我怎樣才能解決這個問題?感謝您的幫助... #include<iostream>
using namespace std;
class Ratio {
public:
Ratio(int numerator, in