Re: Easy one.
Re: Easy one.
- Subject: Re: Easy one.
- From: Jean Bovet <email@hidden>
- Date: Fri, 15 Jul 2005 01:26:16 -0700
%s expects a null-terminated array of 8-bit unsigned characters...
simply use %@ with your object and it will work.
Jean Bovet
Le 15 juil. 05 à 01:13, Derrick Carlin a écrit :
For you. not me... heh heh
I'm just learning...
What is wrong with this code?...
This is what it returns:
[Session started at 2005-07-15 01:10:53 -0700.]
2005-07-15 01:10:53.958 dcRegCodeGenerator[3854] hello
2005-07-15 01:10:53.965 dcRegCodeGenerator[3854] Here is the result
¢áÀÃ
2005-07-15 01:10:53.965 dcRegCodeGenerator[3854] hello
dcRegCodeGenerator has exited with status 0.
#import <Foundation/Foundation.h>
#import <stdio.h>
@interface CodeMachine: NSObject
{
NSString *crypted;
}
-(void) setter:(NSString *) hello;
@end
@implementation CodeMachine;
-(void) setter:(NSString *) hello
{
NSLog (@"hello\n");
NSLog (@"Here is the result %s",hello);
NSLog (@"hello\n");
}
@end
int main(int argc, char *argv[])
{
CodeMachine *myCodeMachine = [[CodeMachine alloc] init];
[myCodeMachine setter:(NSString *)@"mom"];
return 0;
}
Thanks for the help.
-
Derrick Carlin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40arizona-software.ch
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >Easy one. (From: Derrick Carlin <email@hidden>) |