Im jus playin around with this code, its supposed to give off the matrix effect ex. the running random symbols and numbers b4 the movie starts. So i kinda did it a generic way, but i want to know is there a way to slow down the letters, or the whole program? (and yes, it is supposed to be on an ifinite loop.)
On Windows, #include <windows.h> and use VOID WINAPI Sleep( DWORD dwMilliseconds );
A millisecond is 1 000 = 1 second.
On POSIX systems, #include <unistd.h> and use void usleep( unsignedlong microsec ); (BSD version. The SuSE version conforms to this one in use.)
A microsecond is 1 000 000 = 1 second.
That essentially would be awsome, but i need a mix of symbols, letters and those letters and symbols scrolling in a downward fashion(or looking like it) with some parts broken to make the "effect"
In the program i made, everything is moving so fast that you cant tell what its supposed to be. so i wanted to slow it down so that the text itself (all text) is moving slower. not uber slow but slowly. theres only one good version of this that i found done in C# and i wanted to do it in C++
Try adding a delay function at the end of the do using time.h or something, just make it hold for a second after all the couts. You shouldn't have to change your code that way.
Hello again, i found a solution to my problem. Duoas, you were right about the sleep cmd but you should post how to use it correctly. no void or dword needs to be used:
But you should know, I am not obligated to post anything. What you got are function prototypes pulled right off of MSDN and the Linux man pages. You can expect to see such things when people answer questions, so you should learn to recognize them, not complain about how cut'n'pasting them didn't work. (Sorry. I just read what I wrote and it sounds a lot harsher than I meant it to be. Notice how I don't retract it though.)
In C and C++, all functions have a prototype, AKA a type, just like variables and constants and other data. A functions type is: what kind of thing it returns, and what kinds of things (and in what order) it takes as arguments. The compiler must know this information for you to use functions (well, to use them properly, at least). And the programmer usually needs to know it also.