how to create a string literal as a function argument via string concatenation in c

Posted by Reed Debaets on Stack Overflow See other posts from Stack Overflow or by Reed Debaets
Published on 2010-04-09T20:31:05Z Indexed on 2010/04/09 20:33 UTC
Read the original article Hit count: 469

I need to pass a string literal to a function

myfunction("arg1" CONSTANT "arg1");

now part of that constructed string literal needs to be a function return

stmp = createString(); myfunction("arg1" stmp "arg2");

is there any way to do this in one line? myfunction("arg1" createString() "arg2"); //doesn't work ... why not? what instead?

NOTE: C only please.

© Stack Overflow or respective owner

Related posts about c

    Related posts about concatenation