Hello all, i have a classical C program from two functions(main and children).
I created Cocoa project(i creating GUI for my old console C program), what we have...
myprog.h
myprog.m
How to make a function "children" as class method myprog???that I could call a function "children" from main code
- (IBAction)button_start: (id)sender
What the correct syntax for "children" in .h and .m files???
I need to keep the function "children" as an external function.
Thx for advice.
I created Cocoa project(i creating GUI for my old console C program), what we have...
myprog.h
Code:
#import <Cocoa/Cocoa.h>
@interface myprog : NSObject {
IBOutlet id int_field;
IBOutlet id result_field;
}
- (IBAction)button_start:(id)sender;
//insert from my old C program
[B]+ (void) children:(char) string1[], (int) integer1 and:(int) integer2);[/B]
@end
myprog.m
Code:
@implementation myprog
- (IBAction)button_start:(id)sender {
int minvalue=1;
int maxvalue=100;
etc..................
//from C program function
[B]children(string1, integer1, integer2);[/B]
}
@end
How to make a function "children" as class method myprog???that I could call a function "children" from main code
- (IBAction)button_start: (id)sender
What the correct syntax for "children" in .h and .m files???
I need to keep the function "children" as an external function.
Thx for advice.