Re: Standard input/output in Objective-C

2010-03-23 Thread Jens Alfke
On Mar 23, 2010, at 2:44 PM, Mikael Wämundson wrote: inputData = [fileHandle availableData]; inputString = [[NSString alloc] initWithData: inputData encoding:NSUTF8StringEncoding]; [aPerson setPersonsFirstName: inputString]; You could just call fgets and then convert the resulting C string

Re: Standard input/output in Objective-C

2010-03-23 Thread Mikael Wämundson
Thnx! Just changing the suffix to .mm and rebuilding worked and the library was found! Great! /Mikael 23 mar 2010 kl. 22.56 skrev Brian Postow: > > On Mar 23, 2010, at 5:44 PM, Mikael Wämundson wrote: > >> First: Yes, I've been looking around on the net to find an answer ;) >> >> I really l

Re: Standard input/output in Objective-C

2010-03-23 Thread Nick Zitzmann
On Mar 23, 2010, at 3:44 PM, Mikael Wämundson wrote: > My first attempt is of course to just use the cin/cout methods by importing > iostream.h, but when looking for the header file I find it deeply buried > (/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/H

Re: Standard input/output in Objective-C

2010-03-23 Thread Brian Postow
On Mar 23, 2010, at 5:44 PM, Mikael Wämundson wrote: > First: Yes, I've been looking around on the net to find an answer ;) > > I really like the C++ method of using cin/cout in the iostream.h when > communicating via the standard input/output (i.e. the Terminal). > > When doing this in Objec

Standard input/output in Objective-C

2010-03-23 Thread Mikael Wämundson
First: Yes, I've been looking around on the net to find an answer ;) I really like the C++ method of using cin/cout in the iostream.h when communicating via the standard input/output (i.e. the Terminal). When doing this in Objective-C it gets, to me, very complicated. Seems I'm going wrong som