c function to used in cpp file

I want to add c function in cpp file

one.h
#ifdef __cplusplus
extern "C"
{
#endif
int function(int data);
#ifdef __cplusplus
}
#endif


Second.cpp file

#include "one.h"

cpp function()
{
function(data);
}

Error: unresolved linking reference in private:virtual class
Post your real code and real error messages.
Not paraphrased and edited.

And use [code][/code] tags.
https://www.cplusplus.com/articles/jEywvCM9/
Topic archived. No new replies allowed.