1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
// char_traits::move
#include <iostream> // std::cout
#include <string> // std::char_traits
int main ()
{
char foo[] = "---o............";
std::cout << foo << '\n';
std::char_traits<char>::move (foo+3,foo,4);
std::cout << foo << '\n';
std::char_traits<char>::move (foo+6,foo,7);
std::cout << foo << '\n';
return 0;
}
|