I would like to know how to add a string to array of char*
#define FROM "<rasulasath@Tester.com>"
#define TO "<rasulasath@gmail.com>"
#define CC "<rasulasath@gmail.com>"
#define SUBJECT "TESTING SUBJECT"
string testing("USING variables");
const char * c = "Subject: ";
static const char *payload_text[]={
"To: " TO "\n","From: " FROM "\n","Cc: " CC "\n",c "\n",
"\n", /* empty line to divide headers from body, see RFC5322 */
SUBJECT "\n",
"\n",
"Testing the msg.\n",
"Check RFC5322.\n",
NULL
};
I would like to add either c or the variable testing to the array of payload_test[]
or is there other way to create the array paylod_text[] with user insiated variables.
If you want to add testing then just put it in the parameters as
Also one more way is there
And to put in array use