Hi everyone,
Firstly, I'm going to start with the second part of the title, my intro. My forum name (and just about any other online name) is "rider_eragon" or "rider eragon". You may have seen me at other forums, you may have not. If you want to skip the whole intro, look for the ===END OF INTRO=== section further down.
I'm a student studying my Higher School Certificate (HSC) down under in Australia. For those of you who don't know what the HSC is, in a nutshell the HSC is Year/Grade 12 and is the most important year of secondary schooling for Australians in NSW. For those of you whom want to know the intricaies of the course, I suggest you visit either
http://www.boardofstudies.nsw.edu.au/australian-curriculum/ or
http://en.wikipedia.org/wiki/NSW_HSC. I'm a sciency-guy, studying:
- English Standard (2 units)
- Studies of Religion I (1 unit)
- Mathematics Advanced (2 units)
- Mathematics Extension 1 (1 unit)
- Chemistry (2 units)
- Information Processes and Technology (2 units)
- Software Design and Development (2 units)
This gives me a total of 12 units (supposedly optimum number for any HSC student). I am however, studying Software Design by correspondence (our school doesn't offer the course so I study it via another school). With all of this knowledge, I'm sure you're probably assuming that I'm heading for some sort of science/math/computer-based career. If so, you're spot on - I'm hoping to study Computer Science at uni, majoring in either Security, AI or Game Development with as many minors in AI as possible.
Software Design (or SDD) is the high school version of Software Engineering. In a nutshell, we learn about:
- The development approaches (waterfall, prototype, RAD and end-user)
- How to develop software using the waterfall approach, how to do proper
- Project statements
- Feasibility studies
- Basic sysML/UML (system flowcharts, context and data-flow diagrams, IPO diagrams, data dictionaries, storyboards and screen designs)
- Basic data structures (single- and multi-dimensional arrays, records/structs and both types of files)
- Planning algorithms (pseudocode and flow-charts)
- Desk checking (white and black box testing)
- Metalanguages (syntax diagrams, BNF and EBNF)
- Compilers and Interpereters
- The Software Developer's Aspect of Hardware (class elective, studied)
- The History of Programming Languages (class elective, not studied)
- Visual Basic.NET (this is
NOT a course requirement; we could have been taught FASM if the teacher was wanting to)
- Evaluation of developed systems
- Maintenance of developed systems
So basically now you know about my educational history. School's very demanding and some of my hobbies that I've developed over the years have had to be sacrificed, but fortunately, programming isn't one of them. I am skilled in basic C, intermediate C++, rudamentary C# and straightforward Visual Basic.NET 2008 (thanks to SDD).
Obviously, we're given applications to build, otherwise it wouldn't be SD Development, just Software Design. I get fairly good marks for my assignments - my average is somewhere between 96% and 99%.
Our Major project was split into two parts - the first was to make a Medical Search Program and the second is to make a game suite (hangman and memory). After a discussion with my teacher, I was given the OK to use C++/C# (originally I'd planned on C#/XNA for RAD, but the powers that be decided that C# was too controlled by its creators).
I'm utilising as many resouces as possible, as my teacher has, from what I understand, a limited knowledge in C++/C# and I'm on my own for C++/C# issues. Hence, I will be posting here and on GameDev.net frequently whenever I run into issues. My teacher has said that because of the nature of the way I'm studying, no question is too trivial, and while I do get the majority of SDD and a fair bit of C++, I'm only human and humans can't understand everything. Rest assured, I will try to keep the forums as trivial free as possible.
==============================END OF INTRO==============================
That being said, I'm pretty sure that this question is one of the most trivial. Having gone through my
Sams Teach Yourself C in 21 days,
Sams Teach Yourself C++ in One Hour a Day,
Sams Teach Yourself C++ in 10 Minutes and
Game Programming All In One books, the C++ primers of my
AI Techniques For Game Programming and
Data Structures For Game Programmers books, the Internet and this site (forums and documentation), I'm pretty sure I've looked hard enough and not gotten my answer. Sure each source covers the general topic, but not this specific question.
I'm writing a header for my game that contains all of the non-standard C++ data structures (bit vectors, linked lists, trees, etc.). Basically, I want this to be perfect. Now I'm referencing to the following headers:
stdio.h,
stdlib.h, and
iostream.h
What I'm not sure of what to do is enclose the
#include
section in the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
// Some basic housekeeping to include the basic C and C++ headers
#ifndef STDIO_H_INCLUDED
#define STDIO_H_INCLUDED
#include <stdio.h>
#endif // STDIO_H_INCLUDED
#ifndef STDLIB_H_INCLUDED
#define STDLIB_H_INCLUDED
#include <stdlib.h>
#endif // STDLIB_H_INCLUDED
#ifndef IOSTREAM_H_INCLUDED
#define IOSTREAM_H_INCLUDED
#include <iostream>
#endif // IOSTREAM_H_INCLUDED
|
Is it even necessary to include these in my header files (this won't be the only header file I make - I'm making one for searches and sorts) or other C++ files that will be referenced to in main.cpp? Is including them in my main.cpp file suffice? If not, is what I've done the proper way? The following is the structure of my program:
main.cpp #includes:
- stdio.h
- stdlib.h
- iostream.h
- string.h
- math.h and so on for the STL...
- datasty.h (the header in discussion)
- seacort.h
- Other headers
- Other C++ files
Each of my own files will make reference to the STL. Seeing as each and every file goes back to my main.cpp, does the STL need to be referenced in every other file? My first assumption was yes, but I'm not quite sure how to go about it.
Thanks for reading this 6233 character response,
rider_eragon