I want to refactor:
const char* arr =
"The "
"quick "
"brown";
into something like:
const char* quick = "quick ";
const char* arr =
"The "
quick
"brown";
because the string "quick" is used is many other places. Ideally I need to be able to do this with just const primitive types, so no string. What is the best way to do this?
Compiling the comments in the form of an answer:
Use a macro.
Use
std:string
.Working code:
Output: