Question: I would like you to write your own print function for this lab and I would like you to overload the function so that it
I would like you to write your own print function for this lab and I would like you to overload the function so that it prints strings, doubles, integers, and characters. However for the strings I would like you to have it print with delays just like chatgpt. The code to do this is provided bellow
int main
Seed the random number generator
srandstaticcasttime;
std::string inputString "Hello, this is an example of an input string. Watch... ok done";
for char c : inputString
std::cout c std::flush;
double randomdelay staticcastrand RANDMAX;
std::thisthread::sleepforstd::chrono::durationrandomdelay;
return ;
What this means is that you will have functions with the same name but with different parameters. It should look something like this:
void myPrintint input
void myPrintstring input
void myPrintdouble input
void myPrintchar input
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
