I need to wright my won strcmp function. so i need to know how strcmp works.
I need to wright my won strcmp function. so i need to know how strcmp works.
How do you think it works?
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
It takes two strings and compares them by each element. If the string matches, it gives a certain value, if it doesn't match it gives a different value.
Look up "strcmp() in c" it will give more details.
what is that value? how it is assigned? and how it is calculated?
Obviously, you would loop over the two strings. I suggest that you venture an answer yourself. If you want spoonfeeding for this one, then I might as well write the function for you, and that will spoil your fun.Originally Posted by sagar474
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
We've all done this exercise before. Now it's your turn.
Quzah.
Hope is the first step on the road to disappointment.