Unsigned integer type which is large enough to index any array. Technically I should have used std::string::size_type, but I was lazy. You can use int if you want.
what is the member .begin, .end?
They returns iterators to the first element and past the end respectively. Iterators are integral part og C++ and standard library. They (and begin/... member function) exis in all STL containers.
What is std:: transform?
It is the standard algorithm which applies function (passed last) to each element in range (first two parameters) and stores result in range starting from passed iterator (Third parameter). If first and second parameter are same it saves result of application of function to the element in same element. Like c = toupper(c) http://en.cppreference.com/w/cpp/algorithm/transform
gcc may show different result in windows and linux?
I doubt it.
However whole line c = c- ('a' - 'A'); is unportable. You should not make assumptions on how characters are stored in codepage. Use library functions: c = toupper(c). It is faster than calculation. It will be correctly imlemented on target enviroment. It is self-descriptive.
yes, libraries make coding easier. but at beginner level one should try non-library versions to explore the language. such as if the OP sorts using algorithm library, the professor may doubt that as copy-code.
do you know any recognized C++ environment, where int('a') != 97
Yes, we support several programs for industrial controllers which uses nonstandard codepage. Namely letters are grouped as: "AaBbCc...ZzАаБбВв...Яя0123456789". Additionally I can simply change codepage used in linux terminal and se incorrect output.
Additionally your example is not working even in normal Windows enviroment for those who uses not only English.
I am all for learning and reimplementing standard algorithms when it is exactly what is needed: you need to implement sorting — OK; you need sorted data — use standard library.
One of the worst programming sins is reinventing the wheel. So it is better to know what language has to offer you then to learn specifics. Like Top-down learning.