how would i get the date in this format? anyone plz :P
This is a discussion on date in this format yyyymmdd within the C++ Programming forums, part of the General Programming Boards category; how would i get the date in this format? anyone plz :P...
how would i get the date in this format? anyone plz :P
depends on the tools you have to use and the input source you are going to use. If you are using std C/C++ look into the time.h file. There are a lot of functions relating to time there. If you are using a GUI, then they frequently use wrapper functions for those in time.h. If you are just getting user input then use strings and concatenation with strcat if you are using std C/C++ or += if you are using std string class.
i will not be using a gui but i will be getting the time from the system and not a user any sugestions?Originally posted by Unregistered
depends on the tools you have to use and the input source you are going to use. If you are using std C/C++ look into the time.h file. There are a lot of functions relating to time there. If you are using a GUI, then they frequently use wrapper functions for those in time.h. If you are just getting user input then use strings and concatenation with strcat if you are using std C/C++ or += if you are using std string class.
Look in your time.h header. I believe asctime() does that, but not sure.
Code:int main(void){srand(time(0));for(double l=rand(),l0=0,l00=0;;l0+=0.1){for(double l000=0;l000 <1;l000+=.001,l+=((double)rand()/RAND_MAX)/0x64,l00+=((sin(l*0x8*atan(l0)*l000-(l0*0x8*atan (l)))*0.5)+0.5)){l00-=floor(l00);for(size_t l0000=0,l00000=(size_t)(0x50*(l00));l0000<l00000;++l0000 )putchar(0x20);putchar(0x61+(int)((double)rand()/RAND_MAX*0x1a));putchar('\n');}}return 0;}