Search:
Type: Posts; User: arij177
Search:
Search took 0.02 seconds.
-
Yah, I looked at both of those ways, just used the one that was visually simpler to my mind at the time :P. What is the actual benefit of doing it that way?
-
Thank you w3rd, that makes sense now, I was trying something similar, but can't believe I overlooked how you did it. Cheers, and thanks for the patience.
-
Yes I have a book that I am referring to atm, also, I need the provCode to be two letters, as one isn't sufficient to represent all the different provinces. Any ideas?
-
My output with single quotes is:
Constructor called.
Sin # is 22252
Federal tax rate is 0.21
Prov tax = -5.09078e+063
-
When I change my single quotes to doubles it gives me an error regardless:
error C2446: '==' : no conversion from 'const char *' to 'int'
-
Also did you keep provCode as a char? Or did you change that too?
-
I am using Visual C++ 2005 Express, and can you paste exactly what you changed to get that output? Because for me it is not working whatsoever.
-
Even if i make the province code 1 character it still gives me the same, wrong, output. Any idea why?
-
Have narrowed it down further, the char in the if statement is messing it up, but I have no idea how to get around this, is there a way to cast it to a double?
-
I changed my ProvTaxFunction to
double ProvTaxFunction()
{
if(provCode == 'ON')
{
provTaxRate = 0.19;
}
if(provCode == 'BC')
-
Hey all, I am having a problem where my function ProvTaxFunction() doesn't output properly due to an if statement being needed. Any help is appreciated...
class CTaxCalc
{
public:
...
-
June 18th, 2009, 03:02 PM
-
June 18th, 2009, 02:47 PM
Reverting back to what I had before:
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
-
June 18th, 2009, 02:43 PM
Well, what I need this to do is :
Take taxOne(or taxTwo depending on the income), and multiply it by 0.07% to get the airTax value.
-
June 18th, 2009, 01:47 PM
I keep getting this error on line 39, as well as some others.
error C2296: '*' : illegal, left operand has type 'double (__cdecl *)(double *)'
I have no idea how to fix it, it gives me the same...
-
June 15th, 2009, 04:48 PM
I am doing it to what was asked of me, and had to use MAX_A and MAX_B, I would have preferred just using 3 and 4 but yeh. And I did get it to work fine with a few alterations, I am not very good with...
-
June 12th, 2009, 02:49 PM
Solved it myself. Don't worry about posting long solutions etc.
-
June 12th, 2009, 02:42 PM
It turns out that my array is only saving data to the last memory location, any ideas of a fix?
-
June 12th, 2009, 02:24 PM
Hey all, I have made a 2D array that stores user input but I cannot get it to display properly, I have resorted to using pointers and it is not going any better. Here is what I have so far.
...
|
Click Here to Expand Forum to Full Width
|