C++ Quiz
A rather hardcore C++ quiz from PVS Studio developers: q.viva64.com
A rather hardcore C++ quiz from PVS Studio developers: q.viva64.com
include <string>
std::string operator*(std::string& s, unsigned int n)
{
std::string cml;
cml.reserve(s.size() * n);
for (decltype(n) i = 0; i < n; i++) {
cml += s;
}
return cml;
}
int main()
{
std::string s = "test";
std::string sss = s*3;
std::cout << sss << std::endl; // testtesttest
}