If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

i get several errors:
"C:\Users\Joaquim\Documents\CodeBlocks\test\main.cpp|16|error: no matching function for call to 'transform(std::basic_string<char>::iterator, std::basic_string<char>::iterator, std::basic_string<char>::iterator, <unresolved overloaded function type>)'|"
so seems these book isn't the best
but can anyone advice me?

Re: about Standard Template Library(uppercase and lowcase)

Originally Posted by Cambalinho

so the Standard Template Library isn't portable\ANSI?

Of course it's portable because it's part of the ANSI standard document. If a compiler says it is ANSI standard, then it must come with STL library as per the standard. It doesn't matter if the compiler is on Windows, UNIX, Macintosh, a mainframe, etc. If the compiler says it is an ANSI standard C++ compiler, it must come with an STL implementation.

Re: [RESOLVED] about Standard Template Library(uppercase and lowcase)

No, insofar as it has been integrated into the C++ standard library, it is indeed part of standard C++.

Originally Posted by Cambalinho

i get several errors:
"C:\Users\Joaquim\Documents\CodeBlocks\test\main.cpp|16|error: no matching function for call to 'transform(std::basic_string<char>::iterator, std::basic_string<char>::iterator, std::basic_string<char>::iterator, <unresolved overloaded function type>)'|"
so seems these book isn't the best
but can anyone advice me?

You should #include <cctype>. However, even after you do so, there's a problem in that there is a function template named toupper (and likewise, tolower) in the std namespace, in addition to the function named toupper (and likewise, tolower) that was inherited from the C standard library. In the event that the header with the function template is indirectly included, the compiler will be unable to determine what you mean when you just write toupper.

Since the version of toupper inherited from the C standard library should also be available in the global namespace, one way out would be to write ::toupper instead of the unqualified toupper. Likewise, ::tolower instead of tolower.

Re: [RESOLVED] about Standard Template Library(uppercase and lowcase)

Originally Posted by laserlight

No, insofar as it has been integrated into the C++ standard library, it is indeed part of standard C++.

You should #include <cctype>. However, even after you do so, there's a problem in that there is a function template named toupper (and likewise, tolower) in the std namespace, in addition to the function named toupper (and likewise, tolower) that was inherited from the C standard library. In the event that the header with the function template is indirectly included, the compiler will be unable to determine what you mean when you just write toupper.

Since the version of toupper inherited from the C standard library should also be available in the global namespace, one way out would be to write ::toupper instead of the unqualified toupper. Likewise, ::tolower instead of tolower.

thanks for all.. thank you.
(sorry i recive an error, when i try rate you.. sorry Paul McKenzie, you too)

Re: [RESOLVED] about Standard Template Library(uppercase and lowcase)

i'm studing C++ using the Teach Your Self C++ in 1 Hour a Day.

What version of the book are you using? If you are using edition 7 (May 2012) - the latest published version - then this only gets a 1 or 2 star rating (out of 5) with a lot of errors in the code - like that which you have just encountered! Also note that it only covers those parts of the c++11 standard as implemented by Microsoft Visual Studio - not the full c++11 standard as implemented in gcc. Some people quite like the concept of learning broken down into 1 hour 'chunks' but IMO there are better c++11 books now available.

All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

Re: [RESOLVED] about Standard Template Library(uppercase and lowcase)

so the Standard Template Library isn't portable\ANSI?

As Paul stated in post #3, any ANSI compilant c++ compiler must come with a STL. However, different compilers come with different implementions of the STL. The implementation of the STL that comes with the gcc compiler will be different from that which comes with Microsoft Visual c++. Though they will provide the same functionality as defined by the standard, they way they achive this will differ. eg the the algorithm used to allocate more capacity to a vector when trying to push new elements is different between the different vendors.

All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

Re: [RESOLVED] about Standard Template Library(uppercase and lowcase)

Originally Posted by 2kaud

As Paul stated in post #3, any ANSI compilant c++ compiler must come with a STL. However, different compilers come with different implementions of the STL. The implementation of the STL that comes with the gcc compiler will be different from that which comes with Microsoft Visual c++. Though they will provide the same functionality as defined by the standard, they way they achive this will differ. eg the the algorithm used to allocate more capacity to a vector when trying to push new elements is different between the different vendors.

yes. now the code works fine
i love SAMS books, because they have little chapters and is more easy to study, but, true, theres at least that errors
some books use chapters with 30\40 pages.... it's to much
but like you said that theres a better books, tell me a book name, please
thanks for all to all

All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!