c++ Using map or vector to fix the Case tests.

Oct 6, 2018 at 8:16pm
I have below code and i would like to finish the remaining part of project..

1) Processing all files, including printing either the top or all mode, for phrase lengths that might be greater than 1, and determining if all phrases are the same length.


using namespace std;

void toLower(char* str) {

for(char* j = str; *j; j++)

{

*j = tolower(*j);

}

}

int main(int argc, char* argv[]) {



ifstream infile1;

if(argc == 1)

{

cout << "NO PHRASE LENGTH" << endl;

return -1;

}

int negnumcheck = atoi(argv[1]);

if(negnumcheck <= 0)

{

cout << "INVALID PHRASE LENGTH" << endl;

return -1;

}

else if(argc == 2)

{

cout << "NO MODE" << endl;

return -1;

}

}
Last edited on Oct 9, 2018 at 4:51pm
Oct 6, 2018 at 8:30pm
I don't see a question.
Topic archived. No new replies allowed.