I am writing a function to do percent values... I need to return them all to the main function.. I know OF reference parameters.. not how to use them or how to even set it up for something like this >.> any help is much appreciated ^^
#include <iostream>
void foo1( int x ) {
x = 5;
}
void foo2( int& x ) {
x = 6;
}
void foo3( int* x ) {
*x = 7;
}
int main() {
int a = 1, b = 1, c = 1;
foo1( a );
std::cout << a << std::endl;
foo2( b );
std::cout << b << std::endl;
foo3( &c );
std::cout << c << std::endl;
}