I'm having a problem with the following code:
#ifndef UTILS_H
#define UTILS_H
#include <cstdint>
#include <iostream>
namespace Utils
{
template<class T>
std::string hexify(T val)
{
std::stringstream stream;
stream << "0x"
<< std::setfill('0') << std::setw(sizeof(T) * 2)
<< std::hex << val;
return stream.str();
}
};
#endif
It tells me that "'setw': identifier not found", and the same for every std:: function call.
What's wrong with it?