Sorry my bad English first of all.
I just want to use a class globally in my project but i receive some error. I researched and tried similar titles but didnt work. Maybe i could not do.
code.h
#ifndef CODE_H_
#define CODE_H_
class sinif
{
public: void doSomeThing()
{
/*
...
*/
}
private:
};
sinif A;
#endif
Form1.h
//that is main form
#include "code.h"
#include "b.h"
namespace project
{
/*
...
A.doSomeThing(); // it works
*/
}
b.h
//that is second mini form
#include "code.h"
extern sinif A;
namespace project
{
/*
...
A.doSomeThing(); //it didn't work
*/
}