@zoran404: It doesn't make such a big difference in built-in types.
Anyways, to the explanation:
sum=sum+double((pow(x,t)/(g)))*double(1/g);
This uses the '+' operator.
Because of this reason:
a = a + b;
To use the += operator, you should:
a += b;
But I think for built-in types, this is performed automatically by the compiler via optimizations.
Same for
t = t+3
, it can become
t += 3
.
And for
g=g+1
it can become
g++
or
++g
.
@Op:
Don't refer to errors like on the topic's title.
We don't remember their meaning on the fly.
Luckily you wrote another post where you wrote the actual message of the error (Which is what we can understand on the fly, and will allow us to help you)
Also make good use of the Edit button, you posted two replies to the same thread within two minutes, which doesn't really look so good, and you could have edited the first post... I guess, unless Twicker edited the system.
But seeing you only made 6 posts that's almost good.
Also, when you put some code in your posts, write
and put your code in the middle.
This:
[code]char c = 'x';[/code] |
becomes
char c = 'x';
And tabbing is preserved too within the so called code tags.