So, I know how to make the text in a string read out slowly but my question is, is there a faster way to do it or will I have to go through every sentence in my program and loop every single one? Here's an example of the loop I'm using:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include <iostream>
#include <string>
usingnamespace std;
int main()
{
string a = "Hello World!";
for(int j = 0; j < a.size(); j++)
{
for(int i = 0; i <= 18000000; i++);
cout << a[j];
}
return 0;
}
Any help is greatly appreciated. If this is the best way to do it then I guess I'll suck it up and start coding. lol
That's a much better idea but the loop set up would be somewhat similar though, yes? Is there a faster way than looping or is that my best approach. Thanks for the advise. I didn't even thinking about what the empty loop would do to my CPU.