| Topic: |
DEVELOP > c-Plus-Plus |
| User: |
"ree" |
| Date: |
15 Oct 2003 09:06:59 PM |
| Object: |
_T Dev c++ problem |
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
.
|
|
| User: "Jonathan Mcdougall" |
|
| Title: Re: _T Dev c++ problem |
15 Oct 2003 11:44:08 PM |
|
|
When I use the _T function in Dev-C++
http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.9
Jonathan
.
|
|
|
|
| User: "ree" |
|
| Title: Re: _T Dev c++ problem |
15 Oct 2003 09:28:03 PM |
|
|
ree <ree@hotmail.coom> wrote in
news:Xns94167C2D3487Areehotmailcoom@210.49.20.254:
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));
.
|
|
|
| User: "ree" |
|
| Title: Re: _T Dev c++ problem |
15 Oct 2003 10:02:51 PM |
|
|
ree <ree@hotmail.coom> wrote in news:Xns94167FBFDE370reehotmailcoom@
210.49.20.254:
ree <ree@hotmail.coom> wrote in
news:Xns94167C2D3487Areehotmailcoom@210.49.20.254:
HINTERNET hRequest = HttpOpenRequest(hConnect, "POST", _T
("FormActionHere"), NULL, NULL, accept, 0, 1);
HttpSendRequest(hRequest, hdrs, strlen(hdrs), frmdata, strlen
(frmdata));
dont worry I found i was using the wrong type of variable
.
|
|
|
|
|

|
Related Articles |
|
|