String.cpp

I'm a beginner and for homework we were just assigned a lab in which we have to develop and test a lab incorporating myStrLen, myStrCmp, myStrCpy, myStrSwap, myStrUpr, and myStrLwr. I get how to write the indiivual programs but it says we have to fully test the function by putting several calls in main function using different C strings. I'm confused as to whether I'm supposed to prompt the user to enter words to be used as strings or if im supposed to put own strings in the code which can then be changed by the user. Any help would be greatly appreciated.
Last edited on
If the professor didn't tell you different, the easy way is to hard code them in your program.
1
2
3
string string1      ="This is a test.";
string string2      ="This is only a test!";
string string3      ="So on and so forth...";


Later, he may ask you to get them from the user, get them from command line or from a file. You should learn these methods, but now the goal is to complete the assignment.

That makes sense, thank you so much!
Topic archived. No new replies allowed.