constructors, destructors and things that end with ".h"..

Started by
4 comments, last by code_fx 21 years, 12 months ago
what are and how do they work along with... my instructer uses this to make a lower case = capital you know enter y for yes(y=Y have the same value) but he does some crazy stuff to do it. and this is not explained in my book...
Advertisement
Sorry, I don''t really understand the question. What does your instructer does and what book?

A .h file includes the prototypes of the functions or the class definitions. This is so your code wont be a mess as the main codes and prototypes, definitions are not together.

Constructors is the method that is executed automatically when a class is created. Good for initialising class members to default values.

Destructors is the method that is executed automatically when a class is deleted or destroyed. Good for deleted members that have been created on the fly.
Are you sure your book doesn''t have anything on it? I find that highly unlikely. If the book is on C++ and doesn''t have any mention of constructors and destructors, or even header files, then I''d say you need to find a new book.
My book calls them ''deconstructors''. Is that bad??

---signature---
People get ready.
I''m ready to play.
---signature---People get ready.I'm ready to play.
quote:Original post by utwo007
My book calls them ''deconstructors''. Is that bad??

Very.

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ ]
[ MS RTFM [MSDN] | SGI STL Docs | Boost ]
[ Google! | Asking Smart Questions | Jargon File ]
Thanks to Kylotan for the idea!
Hehehe...I know. Just thought that was funny. It''s some C++ Quick Start book and I don''t even read it anymore. Hehe.

---signature---
People get ready.
I''m ready to play.
---signature---People get ready.I'm ready to play.

This topic is closed to new replies.

Advertisement