Page MenuHomec4science

exercise05-2.cpp
No OneTemporary

File Metadata

Created
Sun, Jul 6, 22:09

exercise05-2.cpp

/*
* exercise05-1.cpp
*
/*
* Any headers you need to include should be specified on the next lines
*/
#include <iostream>
void changeVal(double *address, double newVal);
int main(int argc, char* argv[])
{
double i = 5;
double *adr = &i;
double value = 6;
std::cout << "Value before :"<< i << std::endl;
changeVal(adr, value);
std::cout << "Value after : " << i << std::endl;
return 0;
}
void changeVal(double *address, double newVal)
{
*address = newVal;
}

Event Timeline