Segmentation fault with structs and char pointers
I've (quite) recently begun learning C++ and would appreciate some help with this following problem:
The code compiles fine but when run it gives me a "Segmentation fault".I hav'nt the slightest of where to begin looking for a fix!
Possible problem areas:
bool Equal(char*,char*); // Function prototype
bool Equal(char *str1,char *str2) //Is this the problem?
if(strlen1 != strlen2)
for(int i=-1;++i<=strlen1; )
if(str1[i] != str2[i])
My teacher thought it had something to do with the arguments to "bool Equal()". Any ideas as to the reason of the "Segmentation fault"?