Can't figure out what wrong, new to C++

#include <iostream>
using namespace std;
void centimize(double*); //prototype

void main()
{
double var=10.0; //declaration and initialization
cout<<endl<<"var="<<var<<"inches"; //print all values
centimize (&var); //change var to centimeters
cout<<endl<<"var="<<var<<"centimeters";
}

void centimize (double*prtd)

{v*=2.45;} //ptr is the same as var

//Results var=10.0 inches
//var=25.4 centimeters
what is v ?
what it shoulf be is (*prtd)
I am not getting the right value from line 10, I think the function centimize may be written wrong.
Thanks for the help.
You should multiply by 2.54 not 2.45.
Topic archived. No new replies allowed.