+1  A: 

You can't do it with a string "abc", but you can do it with (a,b,c). Look at boost preprocessor metaprogramming library: http://www.boost.org/doc/libs/1_44_0/libs/preprocessor/doc/index.html.

ybungalobill
A: 

Take a look here. This might be an overkill for your case and the code doesn't seem to be portable, but why not? :)

HardCoder1986