I wrote a function to get a current date and time in format: DD-MM-YYYY HH:MM:SS. It works but let\'s say, its pretty ugly. How can I do exactly the sam
DD-MM-YYYY HH:MM:SS
#include #include int main() { std::time_t ct = std::time(0); char* cc = ctime(&ct); std::cout << cc << std::endl; return 0; }