The general format of a function definition is this:
Code:
[decorations\calling-convention] [return data] [function name] ([argument 1], [argument 2], ... etc)
The first bit can be ommited, the decorations & calling convention.
void IloveCpp(double fValue);
Defines a function that does not return anything (void) but takes a double value as an argument. The data in this situation is coppied over to the function. Generally, for small bits of data, this is acceptable. However, for larger structures you must use pointers or references.
void* IloveCpp(double fValue);
This function returns a pointer to any piece of data. A void pointer cannot be dereferenced. I.e you can not do this:
Code:
void* pReturn = IloveCpp(1.24);
*pReturn = 25;
void pointers typically are used to store arbitrary pointers or references to regions of memory that cannot be effectivley described with a structure. Nowadays, there are a lot of tricky hacks you can pull off with meta-programming to get a structure to accurately describe a region of memory, so try to use a structure pointer wherever possible.
void ILoveCpp(double* pValue)
Describes a function which returns nothing, but takes a pointer to a double value. In C++ you would just use a reference here (if you haven't learned about references don't worry about it.) In this case, a pointer to a value is passed reather than copying the actual value over in to the function's context (much more optimal.)
It is also worth noting that you should not worry about returning structures. It varries with implementation by the comiler, but usually something like this:
MyLargeStructure createStructure(const char* sName);
turns in to something like this when optimized\implemented by the compiler:
void createStructure(const char* sName, MyLargeStructure* pReturn);