Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualjnmacd

Posted 13 March 2013 - 12:31 PM

Well you are pointing to the first element in the array, then modifying only sizeof(double) bytes.
Any memory after sizeof(double) bytes should be unaffected.
 
To modify all,
 
memset(ma,1,sizeof(double)*5);
This has nothing to do with reinterpret_cast.

#1jnmacd

Posted 13 March 2013 - 12:29 PM

Well you are pointing to the first element in the array, then modifying only sizeof(double) bytes.

Any memory after sizeof(double) bytes should be unaffected.

 

To modify all,

memset(ma,1,sizeof(double)*5);

PARTNERS