reverse_iterator
いざ使おうと思ったらやりかたが分からなかったのでメモ。
#include <string> #include <iostream> int main() { std::string hello="hello world!"; for(std::string::reverse_iterator rit=hello.rbegin(); rit!=hello.rend(); ++rit){ std::cout << *rit << std::endl; } }
いざ使おうと思ったらやりかたが分からなかったのでメモ。
#include <string> #include <iostream> int main() { std::string hello="hello world!"; for(std::string::reverse_iterator rit=hello.rbegin(); rit!=hello.rend(); ++rit){ std::cout << *rit << std::endl; } }