daria-grebneva / OOP

0 stars 0 forks source link

Замечания по программе FlipByte #5

Closed alexey-malov closed 6 years ago

alexey-malov commented 6 years ago

https://github.com/daria-grebneva/OOP/blob/b3cededc5f105e10674401bb94f2c6eee932997f/LR_01/flipbyte/flipbyte.cpp#L8-L21

alexey-malov commented 6 years ago

https://github.com/daria-grebneva/OOP/blob/b3cededc5f105e10674401bb94f2c6eee932997f/LR_01/flipbyte/flipbyte.cpp#L23-L33 https://github.com/daria-grebneva/OOP/blob/b3cededc5f105e10674401bb94f2c6eee932997f/LR_01/flipbyte/flipbyte.cpp#L50-L52

alexey-malov commented 6 years ago
    if (argc < 2)
    {
        cout << "Please, enter arguments" << endl;
        return 1;
    }
    else if (argc > 2)
    {
        cout << "Too much arguments" << endl;
        return 1;
    }
alexey-malov commented 6 years ago
bool IsDigit(const string& strInput)
{
    for (unsigned int i = 0; i < strInput.size(); i++)
    {
        if (!isdigit(strInput[i]))
        {
            return false;
        }
    }
    return true;
}