problem 1 is syntax error, because what you are trying to do is assiging a char* to a char value which is an error. problem 2 is logical error, because strcmp returns 0 for a completely matched string otherwise -ve if the first string is lexicographicaly small and +ve(>0) for large. you can change the function in the following way:

Lo-Tan, you'd need to _strdup the string to prevent _strrev from reversing the string in place in the memory allocated to word[]. Having done that you ought also to keep a pointer to the returned string so that you can free it, because _strdup mallocs the memory required for the returned string and not freeing the memory would cause a heap leak.

The assignment wordTest [MaxLen] = xxx is wrong too, because MaxLen indexes the (MaxLen+1)th character in a MaxLen-sized array (i.e. it overruns the buffer), but the compiler would warn you about that anyhow, because you'd be attempting to assign a char* to a char.

It is always best to sanity-check code snippets by running tests before committing them. I expect you knew all this anyhow :-)

Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …

Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …

The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.