// ファイル名： Ch04/funcBox_05_ArrayPtr.cc 
#include <iostream> 
#include "units.inc" 
using namespace std; 
void scaleBoxVolume(double*, double); 
 
int main() { 
  double  boxPar[]={ 35.0*cm, 2.5*mm, 1.5*m }, scale=3.0; 
  double* ptrPar = boxPar;  
  scaleBoxVolume(ptrPar, scale); 
  cout << "(x,y,z)= " << *(ptrPar+0)/cm << "cm, " 
                      << *(ptrPar+1)/mm << "mm, "  
                      << *(ptrPar+2)/m  << "m" << endl; 
  return 0; } 
 
void scaleBoxVolume(double* par, double s)  
{ for(int i=0; i<3; i++) *(par+i) *= s; }
