Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / Append chars together

Author
Message
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 30th Apr 2015 10:48
I need to use SendHTTPReqeust which needs a const char * as post data. I have tried strcpy and strcat to put the data together into a single item. But they crash the program, maybe because I use "strings" and char * in a mix to get the final item. I have tried stringstream, converting the streamed string to char, that doesn't work either. Can anyone point me in the right direction? I just want to create a const char * from "strings" and char * that I can use as post data.

The byte chrunchers are coming...
DIVIDING BY ZERO/BECAUSE WE SUCK...
Lucas Tiridath
AGK Developer
15
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 30th Apr 2015 20:19
When you say a string, you mean std::string from the standard library? If so, just use std::string's c_str() method to return a char *.

Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 15th May 2015 22:38
I needed a const char array, I think :-P I got it working

The byte chrunchers are coming...
DIVIDING BY ZERO/BECAUSE WE SUCK...

Login to post a reply

Server time is: 2024-04-25 12:21:43
Your offset time is: 2024-04-25 12:21:43