Anyone Know How To Do C++
#2
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.
#3
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??
#4
#5
This might also help http://www.4p8.com/eric.brasseur/cppcen.html I can't give you an exact answer sorry.
#7
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.
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.
Thread
Thread Starter
Forum
Replies
Last Post
smlblock seven
2nd Generation Specific
8
01-27-2007 05:37 PM
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)