c++ - Can I use the _T() macro with a variable? -


this question has answer here:

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

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -