1) Yes. If I understand correctly you want something like
Code:
struct fraction
{
int big; //dunno the actual name
int small; //dunno the actual name
}
So instead of having 15.23 you will store 15 to fraction.big and 23 to fraction small. That is all. Now, I don't know if there is a standard method for getting the "small" from a number. You get the "gib" by fraction.big = 15.23, of course. To get the small you will have probably to specify how many digits you want.
2) Pass by reference means that you pass the actual object/variable to the function, not a copy. So whatever changes you make to the object/variable are reflected to it. Google it for more information. You use the & symbol to do so
3) If you put void in front of a function it means that it returns nothing. If you want a function lets say to print "hello" on the screen you would do this:
Code:
void fun()
{
std::cout << "Hello";
}
If you want to add two number and return the result:
Code:
int add(int a, int b)
{
return a + b;
}
You can also use return; with a void function but it just terminates the function without returning anything.
These are kind of basic stuff. I recommend studying a book to learn C++