Just a few questions I have if people would be able to answer them for me
?
(1) I have a static class called Config with private variables. This class is in a separate header/cpp file to keep everything tidy. I have made a function called initialise which sets the default values of these variables and it is called at the start of my main. The problem I am having is that when I am trying to access these private fields from initialise in the cpp, the compiler moans about a linking error. To solve this I am having to put something like "bool Config::_required;" at the top of my cpp. I just wondered if this was the proper way to solve this problem?
(2) When is a good time to use try/catch statements or when is a bad time?
(3) Edit: Removed
(4) I never seem to use destructors, when would these be used? I have only been making small applications as of yet.
(5) What are the important aspects of the stack and heap? Should I be coding in a way to utilize these? :S
I am using Windows7, Visual Studio 2008/2010. Thanks.

(1) I have a static class called Config with private variables. This class is in a separate header/cpp file to keep everything tidy. I have made a function called initialise which sets the default values of these variables and it is called at the start of my main. The problem I am having is that when I am trying to access these private fields from initialise in the cpp, the compiler moans about a linking error. To solve this I am having to put something like "bool Config::_required;" at the top of my cpp. I just wondered if this was the proper way to solve this problem?
(2) When is a good time to use try/catch statements or when is a bad time?
(3) Edit: Removed
(4) I never seem to use destructors, when would these be used? I have only been making small applications as of yet.
(5) What are the important aspects of the stack and heap? Should I be coding in a way to utilize these? :S
I am using Windows7, Visual Studio 2008/2010. Thanks.
Last edited: