_T Dev c++ problem

R

ree

When I use the _T function in Dev-C++ if doesn't recognise the function. Is
there a specifc header I need to include. Or is _T only useable in MFC? If
so is there an equivalent for Dec-C++?

TIA
 
R

ree

When I use the _T function in Dev-C++ if doesn't recognise the
function. Is there a specifc header I need to include. Or is _T only
useable in MFC? If so is there an equivalent for Dev-C++?

TIA

I found the answer to it .. include tchar.h

but I still get this error now ..
main.cpp
cannot convert `TCHAR*' to `const CHAR**' for argument `6' to `
----

static TCHAR hdrs[] = _T("Content-Type: application/x-www-form-
urlencoded");
static TCHAR frmdata[] = _T("name=John+Doe&userid=hithere&other=P%
26Q");
static TCHAR accept[] = _T("Accept: */*");

HINTERNET hSession = InternetOpen("MyAgent",
INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
HINTERNET hConnect = InternetConnect(hSession, _T("ServerNameHere"),
INTERNET_DEFAULT_HTTP_PORT, NULL, NULL, INTERNET_SERVICE_HTTP, 0,
1);


// this below line I get the error for the variable accept

HINTERNET hRequest = HttpOpenRequest(hConnect, "POST", _T
("FormActionHere"), NULL, NULL, accept, 0, 1);
HttpSendRequest(hRequest, hdrs, strlen(hdrs), frmdata, strlen
(frmdata));
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top