char* ptr = "xyz"; while( *ptr != '\0' ) { std::cout << *ptr++; } std::cout << '\n';