c++ - Can I use the _T() macro with a variable? -
this question has answer here:
- convert string _t in cpp 6 answers
string pagexx = "http://website.com/" + chatname; string pathxx = "test"; hresult resxx = urldownloadtofile (null, _t(pagexx.c_str()),_t(pathxx.c_str()), 0, null );
the error "error: identifier "lpagexx" undefined." , same pathxx
i cant enter string _t("nice")
because need chatname in specifically. how can make work?
_t
macro putting proper prefix on literal. not you're doing, don't want use _t
.
your problem begins on first line, since you've hardcoded you're using strings narrow characters (i.e. string
string of char
elements) rather selecting appropriate string type. see question automatically change between std::string , std::wstring according unicode setting in msvc++?.
Comments
Post a Comment