View Single Post
  #1 (permalink)  
Old January 29th, 2010, 05:18 PM
earlmw earlmw is offline
Authorized User
Points: 96, Level: 1
Points: 96, Level: 1 Points: 96, Level: 1 Points: 96, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2010
Posts: 19
Thanks: 0
Thanked 2 Times in 2 Posts
Default chapter 5 Ex5_01 question

In Chapter five the 'Try it out' example. When I entered the code for the example and ran it, it produced the same results as in the book on page 237 but it also gave me two warnings on the line 'x = power(x, power(2.0, 2.0));
When I changed it to 'x = power(x, power(2.0, 2)) it compiled without warnings.
Could it have been a mistake in the book?
The warning was C4244 : 'argument' conversion from 'double' to 'int' possible loss of data

Last edited by earlmw; January 29th, 2010 at 05:24 PM.. Reason: entering warning message