I'm getting started with Cocoa programming, and writing a quick little program. When I try to compile this code I get "error: parse error before '@' token". What's wrong???
And also, right now I just want it to display one character to see if it works. But how would I get it to generate, say, an 8 character string of random letters and numbers, then put it in ResultPasswordText?
Thanks!
Code:
#import "MakePassword.h"
@implementation MakePassword
- (IBAction)MakePassword:(id)sender
{
char Randoms;
//[NSString TheResult];
srand([[NSDate date] timeIntervalSince1970]);
Randoms = (char)rand();
[ResultPasswordText setStringValue:@Randoms];
}
@end
And also, right now I just want it to display one character to see if it works. But how would I get it to generate, say, an 8 character string of random letters and numbers, then put it in ResultPasswordText?
Thanks!