Salve,
volevo scrivere una funzione che mi ritornasse data e ora in questo formato:
però mi sono subito arenato nella concatenazione di stringhe:Fri, 10 Oct 2008 14:41:59 GMT
il seguente codice mi ritornail carattere < ??? anche se forzo timeinfo con (char*)codice:// getDateTime std::string getDateTime(void) { time_t rawtime; struct tm * timeinfo; time(&rawtime); timeinfo = gmtime(&rawtime); std::string s = "Year: " + timeinfo->tm_year; return s; }
com'è possibile?
grazie