LiveWire Network Peer Answers Peer Support Teen Forums Tech Forums College Forums 696 users online 211084 members 1261 active today Advertise Here Sign In
TeenCollegeTechPhotos | Quizzes | LiveSecret | Memberlist | Dictionary | News | FAQ
Member Spotlight
Johnboysfun
I haven't filled out my profile...
Days Active: 80
You have 1 new message.
Emergency Help
Until you sign up you can't do much. Yes, it's free.

Sign Up Now
Membername:
Password:
Already have an account?
Invite Friends
Active Members
Groups
Contests
Moderators
5 online / 40 MPM
Fresh Topics
  LiveWire / Technical Forums / Programming & Application Development / Viewing Topic

C++
Replies: 16Last Post April 9, 2006 7:06pm by Misero
Welcome to LiveWire!
We're Stronger Together.
Join the Community
Pages: 1 2  Next » Email Print Favorite
( ana )


Guru

Patron
Reply
i can't get C++ to work on my mac... does anyone know how i can get it to work. it doesnt seem to like things like ''cin''...

-------
Roses are #FF0000
Violets are #0000FF
I am a geek
And so are you

8:36 am on June 18, 2005 | Joined: May 2005 | Days Active: 558
Join to learn more about ana England, United Kingdom | Straight Female | Posts: 5,956 | Points: 21,492
Angel Of Death1337


Dairy Product Addict
Reply
What do you mean a C++?

-------
Constant over-stimulation Numbs me
I would not want you any other way

8:38 am on June 18, 2005 | Joined: May 2005 | Days Active: 182
Join to learn more about Angel Of Death1337 Michigan, United States | Straight Male | Posts: 2,238 | Points: 4,127
Acathrines1

Dairy Product Addict

Patron
Reply
what    

-------
R~I~P Josh, I will love u forever. ICP LETTE 4 LIFE!!! ~Love You Forever Zack~

8:39 am on June 18, 2005 | Joined: April 2005 | Days Active: 122
Join to learn more about Acathrines1 Florida, United States | Bisexual Female | Posts: 2,583 | Points: 3,379
( ana )


Guru

Patron
Reply
i mean the code doesnt work when i try and run it...

(Edited by ana at 11:42 am on June 18, 2005)

-------
Roses are #FF0000
Violets are #0000FF
I am a geek
And so are you


8:40 am on June 18, 2005 | Joined: May 2005 | Days Active: 558
Join to learn more about ana England, United Kingdom | Straight Female | Posts: 5,956 | Points: 21,492
Angel Of Death1337


Dairy Product Addict
Reply
Oh well you see mac sucks ass

-------
Constant over-stimulation Numbs me
I would not want you any other way

8:41 am on June 18, 2005 | Joined: May 2005 | Days Active: 182
Join to learn more about Angel Of Death1337 Michigan, United States | Straight Male | Posts: 2,238 | Points: 4,127
( ana )


Guru

Patron
Reply
Quote: from Angel Of Death1337 at 11:41 am on June 18, 2005

Oh well you see mac sucks ass

yeh so do you... is there anyone that can actually help?

-------
Roses are #FF0000
Violets are #0000FF
I am a geek
And so are you


8:42 am on June 18, 2005 | Joined: May 2005 | Days Active: 558
Join to learn more about ana England, United Kingdom | Straight Female | Posts: 5,956 | Points: 21,492
80Kidz


Soothsayer

Sustainer
Reply
I used to use C++ but I have a PC so I can't really help you..

Though what do you mean it "won't run"???

Are you using a test program to run it off of???

You're coding my have a bug in it....check it over once again...

-------
80Kidz - Arab Hertz Club
et correction d'équations, j'agite la solution


8:43 am on June 18, 2005 | Joined: Jan. 2003 | Days Active: 376
Join to learn more about 80Kidz California, United States | Straight Male | Posts: 5,869 | Points: 10,077
( ana )


Guru

Patron
Reply
the codes fine and everything i had my geek check it for me but it keeps comming up with errors when i put 'cin' or anything like that!

-------
Roses are #FF0000
Violets are #0000FF
I am a geek
And so are you

8:45 am on June 18, 2005 | Joined: May 2005 | Days Active: 558
Join to learn more about ana England, United Kingdom | Straight Female | Posts: 5,956 | Points: 21,492
80Kidz


Soothsayer

Sustainer
Reply
Hmmm, well I don't understand whats going on...

If it's possible....could you post the coding and I will test it on my PC...that's if its not too big...

-------
80Kidz - Arab Hertz Club
et correction d'équations, j'agite la solution


8:52 am on June 18, 2005 | Joined: Jan. 2003 | Days Active: 376
Join to learn more about 80Kidz California, United States | Straight Male | Posts: 5,869 | Points: 10,077
( ana )


Guru

Patron
Reply
its really long but i have tested it on a PC its my f-ing mac! *throws it out the window*.

-------
Roses are #FF0000
Violets are #0000FF
I am a geek
And so are you

8:55 am on June 18, 2005 | Joined: May 2005 | Days Active: 558
Join to learn more about ana England, United Kingdom | Straight Female | Posts: 5,956 | Points: 21,492
80Kidz


Soothsayer

Sustainer
Reply
So it did work on your friends PC???

Well then it maybe the compiler you have.  Did you get it off the internet somewhere???


-------
80Kidz - Arab Hertz Club
et correction d'équations, j'agite la solution


8:59 am on June 18, 2005 | Joined: Jan. 2003 | Days Active: 376
Join to learn more about 80Kidz California, United States | Straight Male | Posts: 5,869 | Points: 10,077
( ana )


Guru

Patron
Reply
yeh i was fine when i tried it at work. the compiler i have is xtools or xcode which came on here...

-------
Roses are #FF0000
Violets are #0000FF
I am a geek
And so are you

9:11 am on June 18, 2005 | Joined: May 2005 | Days Active: 558
Join to learn more about ana England, United Kingdom | Straight Female | Posts: 5,956 | Points: 21,492
Duekiller

Dairy Product Addict
Reply
Sorry to tell you this so late, but your problem is that the libaray that defines cin, is not on the mac because macs have diffrent libraries and shit so you need to grab the mac library (remember C++ is translated into ASSEMBER and then into machine code)

-------
Some days I am the dog, Some days I am the hydrant. In either case the sun shines in my face.

10:35 am on July 5, 2005 | Joined: May 2004 | Days Active: 421
Join to learn more about Duekiller Ohio, United States | Metrosexual Male | Posts: 936 | Points: 5,166
helloworld


Visionary

Patron
Reply
Quote: from Duekiller at 1:35 pm on July 5, 2005

Sorry to tell you this so late, but your problem is that the libaray that defines cin, is not on the mac because macs have diffrent libraries and shit so you need to grab the mac library (remember C++ is translated into ASSEMBER and then into machine code)

What the hell are you talking about? Mac OS X is Unix. Any decent Unix system ships with all the standard ISO C++ libraries. Mac OS X has done so from day 1. The Xcode developer tools ship with all the associated headers and the GNU compiler tools. If you have the tools installed, you can compile anything that is standard ISO C++.

Code:

#include <iostream>

using namespace std;

int main( void )
{
int x;

cout << "Test";
cin >> x;
cout << x;

return 0;
}


Works fine for me. Stick it in a cpp file, run g ++ on it and, boom, done.

(Edited by helloworld at 3:22 pm on July 17, 2005)


12:20 pm on July 17, 2005 | Joined: Oct. 2002 | Days Active: 512
Join to learn more about helloworld New York, United States | Straight Male | Posts: 2,913 | Points: 9,660
Duekiller

Dairy Product Addict
Reply
Quote: from helloworld at 3:20 pm on July 17, 2005

Quote: from Duekiller at 1:35 pm on July 5, 2005

Sorry to tell you this so late, but your problem is that the libaray that defines cin, is not on the mac because macs have diffrent libraries and shit so you need to grab the mac library (remember C++ is translated into ASSEMBER and then into machine code)

What the hell are you talking about? Mac OS X is Unix. Any decent Unix system ships with all the standard ISO C++ libraries. Mac OS X has done so from day 1. The Xcode developer tools ship with all the associated headers and the GNU compiler tools. If you have the tools installed, you can compile anything that is standard ISO C++.

Code:

#include <iostream>

using namespace std;

int main( void )
{
int x;

cout << "Test";
cin >> x;
cout << x;

return 0;
}


Works fine for me. Stick it in a cpp file, run g ++ on it and, boom, done.

(Edited by helloworld at 3:22 pm on July 17, 2005)


Macs use the powerPC architecture and that has diffrent machine instruction codes, meaning that macs will have diffrent binary codes. That is why you cant install windows on a Mac. If you have the windows library then you need the mac specific library.

-------
Some days I am the dog, Some days I am the hydrant. In either case the sun shines in my face.


8:00 pm on July 17, 2005 | Joined: May 2004 | Days Active: 421
Join to learn more about Duekiller Ohio, United States | Metrosexual Male | Posts: 936 | Points: 5,166
Pages: 1 2  Next » Email Print Favorite

Quick Reply

You are signed in as our guest.

Looking for something else?
 

  LiveWire / Technical Forums / Programming & Application Development / Viewing Topic