Short answer: use functions inside a namespace.
namespace foo
{
int f1(param1, param2);
void f2(param1, param2);
}
However, if your application has a OO design, you should ask yourself why you need a bunch of functions that just manipulate input parameters.
Believe me: your code is trying to tell you something :-)
In your snippet of code, you used dummy names (foo, f1, f2, param1, param2), so I cannot guess what your functions do. But maybe your functions operate on the same parameter: in that case you can promote the parameter to become a class.
Before:
bool IsLeapYear( int date );
void IncrementDay( int date, int numOfDays );
After:
class Date
{
public:
bool IsLeapYear() const;
void IncremetDay( int numOfDays );
private:
int daysFromOrigin;
};
If your functions take different parameters, instead, you can consider to allocate your functions to existing classes on your OO design (on the assumption you do want a OO design!).
Finally, if your functions are unrelated, you can consider to move each of them in existing classes even as static methods (it really depends on the meaning of your functions).
As for your final question "Is it a good design?", well it depends on what design you're working on:
- object oriented design: likely it's not a good OO design, but without more context it's difficult to say
- procedural design: it's ok
- functional design: it's ok
While this may or may not be a good design according to your paradigm,
certainly that's not a good C++ idiom: you should use free functions inside a namespace instead of a class with only static methods.