954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

what is the role of set precision?

i have two questions

1st is can any one please tell me what is the role of setprecision in C++, why it is used?

2nd is : this statement

totalS+=sales[i][j];


is equivalent to what, i.e what is the role of this +=

thanks alot

AmerJamil
Junior Poster in Training
53 posts since Oct 2010
Reputation Points: 6
Solved Threads: 0
 
jonsca
Quantitative Phrenologist
Team Colleague
5,621 posts since Sep 2009
Reputation Points: 1,165
Solved Threads: 581
 

ok thanks.. please answer my 2nd question as well..

AmerJamil
Junior Poster in Training
53 posts since Oct 2010
Reputation Points: 6
Solved Threads: 0
 

a+=b;

is equivalent to

a=a+b;

frogboy77
Posting Pro in Training
481 posts since Aug 2010
Reputation Points: 100
Solved Threads: 39
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: