Match function: Using C++ pointers, create a method that returns true if and only if its two C string arguments have exactly same text

Question

The match function is supposed to return true if and only if its two C string arguments have exactly same text.

Explanation

Within the match method, 2 pointer variables are declared for str1 and str2.

‘const char *p1 = str1;’ line will declare a constant (cannot manipulate) variable with the memory address of…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store