cbrawl's Profile
Reputation: 0
Apprentice
- Group:
- Members
- Active Posts:
- 23 (0.03 per day)
- Joined:
- 19-December 10
- Profile Views:
- 649
- Last Active:
May 01 2013 08:27 PM- Currently:
- Offline
Previous Fields
- Country:
- CA
- OS Preference:
- Windows
- Favorite Browser:
- FireFox
- Favorite Processor:
- Intel
- Favorite Gaming Platform:
- PC
- Your Car:
- Who Cares
- Dream Kudos:
- 0
Latest Visitors
-
aaron1178 
01 May 2013 - 05:17 -
shammancer 
04 Feb 2012 - 22:05 -
macosxnerd101 
26 Jan 2012 - 16:03
Posts I've Made
-
In Topic: including object of one class in another
Posted 1 May 2013
B0rn2c0de, on 25 April 2013 - 04:21 PM, said:Quote
use #include "ball.h" in the .cpp file of the other class and then write "class ball" without the quotes on top of your .h file
I didnt quite get what u mean by that
And neways i didnt make a seperate .cpp for each header file i defined the functions in the .h file only
I dont quite understand why people do so is there a specific reason ??
And cant i include the other one .h into another without making a seperate .cpp ??
Thanks in advance
for every class you should have a .cpp file as well as a header file because let's say you want to give that class to someone but don't want to show them your source. Your .h will show them the template of all the functions/variables and whatnot without showing them how those functions work. Other than that the only other reasons to have separate .cpp is to better organize all functions related to one class and not have a 10,000 line main.cpp.
So your project will involve 5 files:
main.cpp ball.h ball.cpp bat.h bat.cpp
Most IDEs will automatically make a class for you and already add all the incudes you need for them to work together and keep them all in the same folder as your main.cpp -
In Topic: Help! I am lost! Game programming in C++
Posted 29 Apr 2013
Have you tried Open GL/SDL libraries. Lazyfoo can get you started with some tutorials -
In Topic: Need members for completely beginer gaming team
Posted 4 Dec 2012
alright I'll also give you my skype in case your more active there -
In Topic: Need members for completely beginer gaming team
Posted 4 Dec 2012
Do you use some sort of chat program like gtalk or msn messenger? -
In Topic: Need members for completely beginer gaming team
Posted 4 Dec 2012
I guess he forgot about us lol
My Information
- Member Title:
- New D.I.C Head
- Age:
- 26 years old
- Birthday:
- June 6, 1986
- Gender:
-
- Programming Languages:
- C++
Contact Information
- E-mail:
- Private
Friends
|
|


Find Topics
Find Posts
View Reputation Given
|
Comments
cbrawl has no profile comments yet. Why not say hello?