文字列の長さを指定して出力するC++流の方法ってあるんでしょうか?

char str = "jpnkor";
printf("%.3s\n", str); //こんなんのC++流

std::cout << std::setw(3) << str << std::endl; //うまくいかない