.h files tell you what you can use, .cpp files tell the compiler how to implement those things that the .h files say you can do. Oftentimes when third parties provide libraries to programmers, they give you a binary library and .h files, but not the original source code in the .cpp files. This way, they can hide how their libraries are actually coded, but still let you use them.
Well, standard string library isn't as good as String library in Qt (QString) or C#, or java strings. There is no ( that I know ) method in standard string library to lower or upper case characters.As you see I am comparing ASCII values(decimal ones) of each character in passed string. then if value is out of lower's character range I'm incrementing it's ASCII value. Go on check it out and try to make own toUpper function.
#include <ctype.h> // If you're using C
#include <cctype> // If you're using C++
void strlower(char *s)
for( ; *s != '\0'; ++s )
*s = tolower(*s);
The great thing is, if *s isn't a letter or other character that doesn't have a lowercase version, nothing will be changed, so you don't have to do an if statement.
As for your original question, you can use stricmp in the standard C library. Include string.h.
It's a good idea to do as little modification of the inputs as possible; in fact, you shouldn't unless it's absolutely necessary. What I recommend is this:
self is a pointer to the current object, used in class definitions to call a member function of that class instead of a global function by that same name, or access a member variable instead of creating/reading from/writing to a local variable by that name.
super() invokes a specific class method implemented by that particular class' parent class. For example, if class A has a function named foo(), class B inherits from A and overrides foo(), then class B can use super() to invoke A.foo() instead of B.foo() as would be the default.
Have you tried using WriteConsoleOutputCharacter() instead of printf()? I'm pretty sure that doesn't move the cursor. However, it won't accept format specifiers, so you'll have to use sprintf() to format your output and then pass that to WriteConsoleOutputCharacter(). Since you're using C++, I would recommend using a string buffer instead, like this:
DWORD dwCharsWritten; // <-- this might not be necessary
outbuf << myvar << " blah blah " << -193 << endl;
cWhere.x = 5;
cWhere.y = 9;
// You might be able to pass in NULL if you don't want to keep track of the
// number of characters written. Some functions allow you to do this, others
// don't. I'm not 100% sure about this one, the documentation doesn't say.
WriteConsoleOutputCharacter(hStdout, outbuf.str(), outbuf.str().length(),