Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-11-2012, 07:31 AM   #1
LQ Newbie
Registered: Oct 2012
Posts: 1

Rep: Reputation: Disabled
Objective C Help

X code keeps giving me an error saying iostream not found. What's the problem??

#import <Foundation/Foundation.h>
#include <iostream>
#include <conio>
class time
int hr,min,sec;
Time reset to 00:00:00";
time(int h,int m,int s)
hr =h;
Time set to specified value.";
void display()
Time set is # "<<hr<<":"<<min<<":"<<sec;
void add(time t1,time t2)
sec = t1.sec + t2.sec;
if (sec > 59)
{sec -=60; min++;}
min += t1.min +t2.min;
{min-=60; hr++;}
hr += +;
void main()
time a(12,11,33);
time b(10,34,50);
time c;
Old 10-12-2012, 12:45 AM   #2
John VV
LQ Muse
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,184

Rep: Reputation: 2505Reputation: 2505Reputation: 2505Reputation: 2505Reputation: 2505Reputation: 2505Reputation: 2505Reputation: 2505Reputation: 2505Reputation: 2505Reputation: 2505
there is NO way we could even try to help unless YOU provide the REQUIRED information

the very basic information is missing
things like

YOUR operation system ?
the version of said OS ?
the version of gcc ( if installed) ?
and whether or not the obj compiler is installed ?
the development librarys ?? -- are they installed??

a wild guess
install the development tools and headers for your OS
Old 10-12-2012, 01:08 AM   #3
Registered: Apr 2006
Location: Montreal,Quebec
Distribution: Gentoo
Posts: 825

Rep: Reputation: 128Reputation: 128
Hi, welcome to LQ

Xcode is for Mac OSX only, so I guess you are not using Linux. If that's the case, then this is the wrong forum to ask that kind of question. Very few peoples around here use OSX. It might be a better idea to ask this on a MacOSX forum.

Looking at your code, this is closer to C/C++ than OBJC. So you would be better to use Objective C++ or C++ directly than trying to do that in OBJc. This might actually be your problem in the first place. OBJc is compatible with C, iostream is from C++. The C equivalent is stdio.h


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Objective C fahad.anwar Linux - Newbie 1 08-10-2012 06:42 AM
Objective-c amboxer21 Programming 3 08-02-2012 03:19 AM
Objective C vbx_wx Programming 1 12-25-2010 09:53 PM
How to compile Objective-C? MTK358 Programming 3 12-31-2009 07:36 PM
Objective-C dogn00dles Programming 2 11-29-2003 02:30 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:59 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration