Static function declared but not defined in C++

In C++, static at global/namespace scope means the function/variable is only used in the translation unit where it is defined, not in other translation units.

Here you are trying to use a static function from a different translation unit (Main.cpp) than the one in which it is defined (File.cpp).

Remove the static and it should work fine.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)