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
};
または変数 testing をpayload_test[]の配列に追加したい、c
またはユーザーが挿入した変数で配列paylod_text []を作成する他の方法があります。