P
pauldepstein
Sorry in advance if this message sounds imprecise but it's difficult to
be precise when you don't really understand what's going on.
I have a class called Parameters. The default constructor
Parameterarameter() contains various values such as interest = 0.05;
My intent is for the user to be able to override these defaults so I
have a function
void Parameter::set(void) . This is supposed to give the user a chance
to define variables differently.
I then include in main a statement of the form Parameter *params = new
Parameter;
To set the variables I have params->set();
When I tried to write these variables, I seemed to be getting default
values, not the values from the user.
So I hit on the probably bad idea of listing the default values as
static int, static double etc.
Not only did this make it not compile. It never compiled when I went
back and deleted the words "static". I got linker error messages and
they stayed with me even when I changed the program back to how it was.
Any help or advice would be appreciated.
If anyone would enjoy helping me via IM or email, that would also be
great.
Yahoo IM: pauldepstein
msn: (e-mail address removed)
email: (e-mail address removed)
Thank you very much.
Paul Epstein
be precise when you don't really understand what's going on.
I have a class called Parameters. The default constructor
Parameterarameter() contains various values such as interest = 0.05;
My intent is for the user to be able to override these defaults so I
have a function
void Parameter::set(void) . This is supposed to give the user a chance
to define variables differently.
I then include in main a statement of the form Parameter *params = new
Parameter;
To set the variables I have params->set();
When I tried to write these variables, I seemed to be getting default
values, not the values from the user.
So I hit on the probably bad idea of listing the default values as
static int, static double etc.
Not only did this make it not compile. It never compiled when I went
back and deleted the words "static". I got linker error messages and
they stayed with me even when I changed the program back to how it was.
Any help or advice would be appreciated.
If anyone would enjoy helping me via IM or email, that would also be
great.
Yahoo IM: pauldepstein
msn: (e-mail address removed)
email: (e-mail address removed)
Thank you very much.
Paul Epstein