[ERROR]
The specified function was declared with the friend specifier outside of a class, structure or union.
friend void foo(void);
Do not use the friend specifier outside of class, structure or union declarations.