What I'm trying to do:
I'm trying to concatenate two strings and "return" the result using this #define statement.
Is what I'm trying to do just not possible with a #define? I know I could easily create a returning function to do this, but using a #define is the preferred method for my circumstance.
Are you #including <string>? Also you need to use std::string or usingnamespace std;. If you are using C++ you should use std::strings instead of C-style strings (char arrays).
#include <string>
using std::string;
string foo() {
string one = "hello";
string two = " ";
string three = "world";
string both = one + two + three;
return both;
}
printOut("data: %s", foo());