Advertisement

Calling all Newbies

Started by November 09, 2002 09:15 AM
55 comments, last by Run_The_Shadows 21 years, 11 months ago
Hey guys. To try and solve my coder''s Block and cure some boredom, I''m considering writing an article or maybe a few, answering basic coding questions you newbies might have. The really common stuff. So I''m putting the call out to you guys to hit this thread with your basic questions. Not "OpenGL? DirectX?" stuff so much as "How can I use command-line switches?". I think you get the idea. If I can get enough good solid questions, I''ll probably write an article for you guys. Have fun. -Ryan "Run_The_Shadows" -Run_The_Shadows@excite.com -The Navidson Record! The best film you''ll never see!
ok here''s one.

we all know const int number;
but what does "const" mean in these sequences?

const int class::addNumber();
int class::addNumber()const;
int class::addNumber (const int);

and my favorite stumper:

const int class::addNumber(const int) const;

so how do they work/mean?

Beginner in Game Development?  Read here. And read here.

 

Advertisement
Alpha_ProgDes - Replace const with volatile and the question suddenly becomes much more interesting

Run_The_Shadows - how about showing that C++ isn''t just ''C with classes ?''

- using C++ std::string and std::vector instead of C char* and arrays - without talking about pointers (yet) - get them to manipulate strings and vectors without worrying about the internals.

- using namespaces (notably std: and the C++ standard headers.

- using standard iostreams, including std::fstream and std::stringstream - and doing error-checking on them.

- using containers, iterators and algorithms.

Or maybe I should just do it...

Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
How about a run down on proper program design. Including stuff defining the problem(like flowcharts, puesdo code, etc..), or C/C++ control structures and when to use them.

Maybe throw some stuff about realtime programming techniques as the example.

Even better explain why pointers should be used and when not to use them.

when i master "const", i'll do volatile

i know there's a subtle difference between a for loop and a while loop. forgot what that difference is though (something about the last iteration...). if someone knows please do tell.

oh! why is that: if "delete" deallocates memory made by "new", then why doesn't delete/deallocate an array also (when made by "new")? isn't the array a block of memory?

that's all i have for now

[edited by - Alpha_ProgDes on November 9, 2002 1:11:39 PM]

new addition: maybe you might have wanna have a beginner game programming section also...

if so you'll want to explain: frames per second, how to calculate how many or what executions go during a passing frame, how to set up the game loop...

but as far as general programming goes: when using templates does your class declaration and implementation have to be in the
same file? how does that work?


[edited by - Alpha_ProgDes on November 10, 2002 11:58:28 AM]

Beginner in Game Development?  Read here. And read here.

 

I can handle pretty much all those requests, and keep ''em coming. Given, you might not see this article for a bit(I''m known for needing tons of revisions before I get any piece of writing correct), but I''ll try and include as much as possible.

-Ryan "Run_The_Shadows"
-Run_The_Shadows@excite.com
-The Navidson Record! The best film you''ll never see!
Advertisement
- Books for beginner''s C / C++
- Compilers - free, etc
- Sites with tutorials
- Data types: pointers, arrays, etc

Just a few suggestions - I''m sure you''d find loads by just searching through some of the threads. :D Yes, sooooo much repetition


Lektrix
[ MultiPlay || The Ladder || BarrysWorld || E-Mail Me ]
[ Google || Start Here || ACCU || STL || Boost || MSDN || GotW || CUJ || MSVC++ Library Fixes || BarrysWorld || [email=lektrix@barrysworld.com]E-Mail Me[/email] ]
That''s what I''m shooting for with this. All our newbie areas are severely lacking last I checked. Sure, the info is there, but often it''s written poorly, or obfuscated among other things. I want to put together *the* guide, so all the new coders out there don''t have to dig and beg and plead and hope for answers on stupid things like File I/O like I had to do back in the day.

-Ryan "Run_The_Shadows"
-Run_The_Shadows@excite.com
-The Navidson Record! The best film you''ll never see!
Considering the number of posts we recently had on various forums about this: please make clear, that function pointers != member function pointers, that they are not exchangeable, and that no dirty trick will change this fact...
you can help right. what next after learning procedural programming and where do i learn it

This topic is closed to new replies.

Advertisement