|
-
April 2nd, 2009, 02:49 PM
#1
string - char* mix and match??
After 3 months of 'C++' (previous languages did not include 'C') I think it's great. But I still find the 'C' bits and the 'C++' bits trip me up.
A simple example is that I generate a format string, as a string type, only to discover printf rejects the string and wants a char*.
My questions:
Is the above true or am I just missing some simple conversion?
Should I try to mix them (C and C++) to the minimum or is the marriage simply the way it is?
String types just seem natural and char* so alien.
Cheers Nigel
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|