You can convert any valid integer type using std::string::c_str(), which is compatible with PCSTR. std::string(DEFAULT_PORT).c_str() is the easiest way to do it, but you need to make sure to have the string header included: #include <string>
std::string(DEFAULT_PORT).c_str()
#include <string>