User Profile
Collapse
-
the function should compare two strings input by the user and if they are the same, return 0, if string 1 is larger return 1 and if string 2 s larger return -1. from that the "result" variable is used to output the correct variable. -
Homemade strcpy() func.
i am supposed to create my own strcmp() function using pointers. this doesnt return anything and i cant figure out why:
...Code:#include <iostream> //#include <cstring> using namespace std; int dumbstrcmp( const char *, const char * ); int main() { char str1[100]; char str2[100]; int result; cout << "Enter 2 strings: ";
No activity results to display
Show More
Leave a comment: