On 22 Jun 2010, at 14:59, Paul Chany wrote:
> main.m:39: warning: passing argument 1 of ‘printf’ from incompatible
> pointer type
Without looking at your code[1], the error seems to be that you are passing an
Objective-C string to a function that expects a C string, in this case to the C
standard library function printf().
You have two options. You can either pass the string to something that expects
an object, like NSLog(), like this:
Log(@"My string: %@", mystring);
This will log the Objective-C string and some metadata about the process.
Alternatively, you can get a C-string representation of the Objective-C string
object by sending it a -UTF8String message, like this:
printf("%s\n", [mystring UTF8String]);
(If you need the string in another encoding, see the NSString documentation)
David
[1] If you want people to help you, it's generally a good idea to make it easy
for them to help. This means putting relevant snippets of the code in your
email, not expecting people to grab a file via FTP and unzip it.
-- Sent from my IBM 1620
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep