Insert BS here A place to discuss anything you want!

Anyone Know How To Do C++

Thread Tools
 
Search this Thread
 
Old Feb 9, 2003 | 10:42 PM
  #1  
ROTARYROCKET7's Avatar
Thread Starter
Senior Member
 
Joined: Dec 2002
Posts: 1,687
From: QUEENS NYC
Question

hey im having troubles with my Oject Oriented programming. this data structures thing is reaking havok on my brain. Making struc and classes. anyone know?
Old Feb 9, 2003 | 11:02 PM
  #2  
drifter's Avatar
Senior Member
 
Joined: Dec 2002
Posts: 1,788
From: Perth, Western Australia
Default

What do you want to know? How to initialise structs? How to use them generally? I've not done C++ in about 6 months, but I might be able to help. Its not too hard. Java programming is heaps easier though.
Old Feb 9, 2003 | 11:08 PM
  #3  
ROTARYROCKET7's Avatar
Thread Starter
Senior Member
 
Joined: Dec 2002
Posts: 1,687
From: QUEENS NYC
Default

i know how to intialize a class and define the private and public members. Im having a problem with the "using namespace std: and also using macroguards. You have to write a the Function prototype in the header file and the function implementation in the cpp extension. so i dont know how to call the the header file. i know u gotta use # include "throttle.h" for example but using namespace how do u do it??
Old Feb 9, 2003 | 11:16 PM
  #4  
drifter's Avatar
Senior Member
 
Joined: Dec 2002
Posts: 1,788
From: Perth, Western Australia
Default

does this help?

http://www.research.att.com/~bs/bs_faq2.html
Old Feb 9, 2003 | 11:20 PM
  #5  
drifter's Avatar
Senior Member
 
Joined: Dec 2002
Posts: 1,788
From: Perth, Western Australia
Default

This might also help http://www.4p8.com/eric.brasseur/cppcen.html I can't give you an exact answer sorry.
Old Feb 9, 2003 | 11:23 PM
  #6  
ROTARYROCKET7's Avatar
Thread Starter
Senior Member
 
Joined: Dec 2002
Posts: 1,687
From: QUEENS NYC
Default

thanks i appreciate it alot
Old Feb 10, 2003 | 10:59 PM
  #7  
Rotarydragon's Avatar
Senior Member
 
Joined: Feb 2002
Posts: 1,381
From: Close enough to annoy you.
Default

using namespace whatever is just a way of keeping all your nifty classes seperated from someone elses. So if I created a class called "PhinsupIsCool" and you decided to create one as well you could still have them both in the same program just seperated by namespace.



std is the Standard Templates Library and gives you access to a bunch of stuff that is commonly done in C and C++. For example cout outputs a string, there's a function to convert things toString and so on. Without it you'd have to manually code all that crap.



Not fun.



Name your headers after your class you'll be happier that way.



Inclusion guards or macro gards make my head hurt.



Function prototypes are simply in the header as you note. Put them in order. Trust me.



Otherwise OOP takes a bit of getting used to in terms of how you think about coding and what not.
Old Feb 10, 2003 | 11:50 PM
  #8  
ROTARYROCKET7's Avatar
Thread Starter
Senior Member
 
Joined: Dec 2002
Posts: 1,687
From: QUEENS NYC
Default

thankz
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
RHex-7
2nd Generation Specific
1
Jul 29, 2007 01:11 PM
smlblock seven
2nd Generation Specific
8
Jan 27, 2007 05:37 PM
Rx7aholic
ECU Discussions
2
Dec 4, 2003 07:04 AM
V8Guy427
RX-7 & RX-8 For Sale
0
Nov 27, 2003 08:16 AM
The Blue Bomber
Insert BS here
4
Mar 1, 2002 07:46 AM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 



All times are GMT -5. The time now is 08:10 AM.