In one function of my code I found a bug. It was written std:string :
const std::string currentDateTime() {
time_t now = time(0);
struct tm tstruct;
char buf[80];
tstruct = *localtime(&now);
//strftime(buf, sizeof(buf), "%Y-%m-%d.%X", &tstruct);
strftime(buf, sizeof(buf), "%Y%m%d%X", &tstruct);
std:string str = buf;
str.erase(std::remove(str.begin(), str.end(), ':'), str.end());
return str;
}
The code compiles without errors. Why does it compile? What does std:string mean then?
std:is a label, there must be a using in there someplace.using namespace std;in an include file where it really really should not have been. Fix bug #1 and compiling failed on bug #2std:string