Houman
October 11th, 2007, 04:42 PM
hello there;
I had a question regarding strings in C++, I have to write some perl code from my C++ program and I was wondering if there is a way to print literal strings in C++ withoug having to escape every single special character,
in Perl this is possible by using single quotes, so i could some something like this:
print 'hi there %im a "special#% & character'
but in C I have to do somethign like this:
printf(" special character \% and \" and \#")
is there any equivalent of single quotes in C/C++?
regards
Houman
I had a question regarding strings in C++, I have to write some perl code from my C++ program and I was wondering if there is a way to print literal strings in C++ withoug having to escape every single special character,
in Perl this is possible by using single quotes, so i could some something like this:
print 'hi there %im a "special#% & character'
but in C I have to do somethign like this:
printf(" special character \% and \" and \#")
is there any equivalent of single quotes in C/C++?
regards
Houman