string::const_iterator i;
i = find( str.rbegin() , str.rend() , '/' );
이렇게 하는데 컴파일 오류가 뜹니다. begin() , end()로 바꾸니까 되는데
역으로 참조하면 const_iterator가 아닌 다른걸 쓰는거 같은데 어떤걸
쓰는지 잘 모르겠네요..
string::const_iterator --> string:const_reverse_iterator
로 변경해주시면 됩니다.
그럼
i = find( str.rbegin() , str.rend() , '/' ); 대신 pos = str.rfind("/"); 를 써보시는건 어떨지요 :D
pos = str.rfind("/");
참조
string::const_iterator --> string:const_reverse_iterator
로 변경해주시면 됩니다.
그럼
[code:1]i = find( str.rbegin(
i = find( str.rbegin() , str.rend() , '/' );대신pos = str.rfind("/");를 써보시는건 어떨지요 :D