Yes, it's a severe blow for all C++-lovers...
And your question is...
ArkM
Postaholic
2,001 posts since Jul 2008
Reputation Points: 1,234
Solved Threads: 348
Compiled id, kindda funny ya, though...
Not really usefull to be honest :P
Tigran
Junior Poster in Training
92 posts since Jun 2008
Reputation Points: 24
Solved Threads: 8
Well, in that case a free advice for a C++ coder: look at the C++ language definition. Must be int main() , not improbable void main() in signature ;)...
ArkM
Postaholic
2,001 posts since Jul 2008
Reputation Points: 1,234
Solved Threads: 348
Whatever it is, it looks pretty lame and probably could be improved with a clearscreen function that is system dependent.
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
Reminds me of the grandaddy of all screensavers. Something like
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
int main()
{
srand( time( NULL ) );
while (1) printf( "%*c", rand() % 15, '*' );
return 0;
}
(This, of course, is just the simplest possible version...)
Duoas
Postaholic
2,043 posts since Oct 2007
Reputation Points: 1,140
Solved Threads: 229
Thank you, Duodas, for this brilliant code!
It's so pity it's not a part of the C RTL...
ArkM
Postaholic
2,001 posts since Jul 2008
Reputation Points: 1,234
Solved Threads: 348
Yeah...I know about that but int main() would need a return statement, which would make my signature 6 lines, one more than is allowed... and anyway, its only just a signature!
Good news for amrith92: The C++ Standard does not require explicit return statement in int main() !
ArkM
Postaholic
2,001 posts since Jul 2008
Reputation Points: 1,234
Solved Threads: 348