Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

add two constant char pointers c++

const char *one = "Hello ";
const char *two = "World";

string total( string(one) + two );

// to use the concatenation as const char*, use:
total.c_str()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #constant #char #pointers
ADD COMMENT
Topic
Name
4+9 =