multi char c++ code example Example: c++ multiply char char star = '*'; int num = 7; std::cout << std::string(num, star) << std::endl;