C Board  

Go Back   C Board > General Programming Boards > Game Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 10-14-2002, 02:31 PM   #1
I am he who is the man!
 
Stan100's Avatar
 
Join Date: Sep 2002
Posts: 361
Question #include files

Can someone give me a link to which #include files do what. How and where do i get sprites and include them in my games?
Stan100 is offline   Reply With Quote
Old 10-14-2002, 09:02 PM   #2
Registered User
 
Join Date: Apr 2002
Posts: 1,571
Here is a link to the ANSI standard ones.

http://www.themost.org/courses/langs...ns/eoc_11.html
MrWizard is offline   Reply With Quote
Old 10-17-2002, 04:59 PM   #3
Registered User
 
Kirdra's Avatar
 
Join Date: Aug 2002
Posts: 102
Stan instead of posting a question everytime you get to a small hurdle you wish to cross I have a suggestion for you :

By a book about Windows game programming and download the DirectX 7 docs...

Step #1 Read the book.
Step #2 Read the docs.

Now repeat the process several times, you should have an understanding of how to load a bitmap file to the screen via DirectX. Alas you need the DirectX SDK! What now!? Well you download the 'SDK' from microsoft's website.

Although this maybe more than you can chew, it is what you got to do. One more thing, you can see what is in a header file by... opening it.
Kirdra is offline   Reply With Quote
Old 10-20-2002, 03:51 PM   #4
I am he who is the man!
 
Stan100's Avatar
 
Join Date: Sep 2002
Posts: 361
Angry Gimme a break

Yo, I'm only 13 dude, and I've been doing this for about 2mths. Maybe I need a better book because Sams Teach Yourself C++ in 24 hours isn't helping. I'm trying to do the best I can. Chill
Stan100 is offline   Reply With Quote
Old 10-22-2002, 12:40 AM   #5
Banned
 
master5001's Avatar
 
Join Date: Aug 2001
Location: Visalia, CA, USA
Posts: 3,699
*sigh* this isn't that hard to understand. And by the way, any book with a title such as "Become a millionaire in just one month" or "Sailing for dummies" is not the best place to start.

Code:
//this is main.c
#include <iostream>
#include "myfile.h"

int MyClass :: stuff() {
   return this->x;
}

void MyClass :: whatever(int &n) {
    n = this->y;
}

int main() {
    MyClass mc;
    cout << mc.stuff();
}
Here is what myfile.h looks like.

Code:
class MyClass {
private:
    int x, y;
public:
    int stuff();
    void whatever(int &);
};
This is pretty basic here. My header file just declares all the functions and classes that my c file contains. In this case I only have prototyped a single class. The c file just defines the class' functions.

This is why header files are there. Okay, i'm sure you are familiar with all this. My point here is that rather than focusing on what each header contains, you should focus on learning what functions and classes you need. From that you will memorize the headers that you use most.
master5001 is offline   Reply With Quote
Old 10-22-2002, 04:24 AM   #6
and the hat of marbles
 
Sang-drax's Avatar
 
Join Date: May 2002
Location: Lund, Sweden
Posts: 2,041
Quote:
Originally posted by master5001
And by the way, any book with a title such as "Become a millionaire in just one month" or "Sailing for dummies" is not the best place to start.
Windows Game Programming for Dummies is a good book.
__________________
Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling
Sang-drax is offline   Reply With Quote
Old 10-23-2002, 09:31 PM   #7
Banned
 
master5001's Avatar
 
Join Date: Aug 2001
Location: Visalia, CA, USA
Posts: 3,699
Sang-drax, I can't disagree there but "Sams Teach Yourself C++ in 24 hours" is not. My point was not that books that contain the word "dummy" in the title are bad. My point was books that have overly ambitious titles are bad. Books like "Sams Teach Yourself C++ in 24 hours" are very effective if you have some programming background, otherwise you end up like poor stan over here.
master5001 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
debug assertion failed! chintugavali C Programming 4 12-11-2007 06:23 AM
Header file include order cunnus88 C++ Programming 6 05-17-2006 03:22 PM
include files that are'nt in compiler's directory vaibhav C++ Programming 10 03-25-2006 11:45 AM
Include files disruptivetech C++ Programming 7 07-12-2005 09:52 AM
include library header in header files Raison C++ Programming 6 09-27-2004 02:50 AM


All times are GMT -6. The time now is 08:41 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22