c++ - Expression must have integral or unscoped enum type on Pointers -


i'm trying open link log usernames unameaddr.
url: http://zzz.com?username=mynameisjack.
need "http://zzz.com?username=" + unameaddr.
i'm getting error. guess syntax seems wrong?

curl_easy_setopt(curl, curlopt_url, "http://zzz.com?username=" + unameaddr); 

the whole code:

char *unameaddr = (char*) exebaseaddress + 0x34f01c; printf("%s \n", unameaddr);  curl *curl; curlcode res;  curl = curl_easy_init(); if(curl) {     curl_easy_setopt(curl, curlopt_url, "http://zzz.com?username=" + unameaddr);      res = curl_easy_perform(curl);      curl_easy_cleanup(curl); } 

update

so tried:

char username[512]; strcpy ( username, "http://zzz.com?username=" ); strcat ( username, unameaddr ); 

but application crashes when processing part.

curl_easy_setopt(curl, curlopt_url, username); 

 #include <iostream>  #include <string>   using namespace std;  ...  ...   string str1 = "hello world.";  const char* cstr = " goodbye.";   string str2(cstr);  string combined = str1 + str2; 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -