Insert BS here A place to discuss anything you want!

Anyone Know How To Do C++

Thread Tools
 
Search this Thread
 
Old 02-09-2003, 10:42 PM
  #1  
Senior Member
Thread Starter
 
ROTARYROCKET7's Avatar
 
Join Date: Dec 2002
Location: QUEENS NYC
Posts: 1,687
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?
ROTARYROCKET7 is offline  
Old 02-09-2003, 11:02 PM
  #2  
Senior Member
 
drifter's Avatar
 
Join Date: Dec 2002
Location: Perth, Western Australia
Posts: 1,788
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.
drifter is offline  
Old 02-09-2003, 11:08 PM
  #3  
Senior Member
Thread Starter
 
ROTARYROCKET7's Avatar
 
Join Date: Dec 2002
Location: QUEENS NYC
Posts: 1,687
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??
ROTARYROCKET7 is offline  
Old 02-09-2003, 11:16 PM
  #4  
Senior Member
 
drifter's Avatar
 
Join Date: Dec 2002
Location: Perth, Western Australia
Posts: 1,788
Default

does this help?

http://www.research.att.com/~bs/bs_faq2.html
drifter is offline  
Old 02-09-2003, 11:20 PM
  #5  
Senior Member
 
drifter's Avatar
 
Join Date: Dec 2002
Location: Perth, Western Australia
Posts: 1,788
Default

This might also help http://www.4p8.com/eric.brasseur/cppcen.html I can't give you an exact answer sorry.
drifter is offline  
Old 02-09-2003, 11:23 PM
  #6  
Senior Member
Thread Starter
 
ROTARYROCKET7's Avatar
 
Join Date: Dec 2002
Location: QUEENS NYC
Posts: 1,687
Default

thanks i appreciate it alot
ROTARYROCKET7 is offline  
Old 02-10-2003, 10:59 PM
  #7  
Senior Member
 
Rotarydragon's Avatar
 
Join Date: Feb 2002
Location: Close enough to annoy you.
Posts: 1,381
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.
Rotarydragon is offline  
Old 02-10-2003, 11:50 PM
  #8  
Senior Member
Thread Starter
 
ROTARYROCKET7's Avatar
 
Join Date: Dec 2002
Location: QUEENS NYC
Posts: 1,687
Default

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

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


Quick Reply: Anyone Know How To Do C++



All times are GMT -5. The time now is 01:11 PM.