Bismarck_1
17.07.2010, 15:10
#include <iostream>
#include <process.h>
using namespace std;
class CInstanz
{
public:
static int a;
static void scan(void *);
};
void CInstanz::scan(void *)
{
for(a; a<5; a++)
{
cout << "Zahl: " << a << endl;
}
}
int main()
{
CInstanz pThread;
_beginthread( &pThread.scan, 0, NULL);
system("pause");
return 0;
}Die Fehlermeldungen:
error LNK2001: Nicht aufgelöstes externes Symbol ""public: static int CInstanz::a" (?a@CInstanz@@2HA)".
fatal error LNK1120: 1 nicht aufgelöste externe Verweise. Ich weis wirklich nicht wie ich dieses Problem beheben kann, weis einer eine Lösung?
(Bin C++ Beginner)
#include <process.h>
using namespace std;
class CInstanz
{
public:
static int a;
static void scan(void *);
};
void CInstanz::scan(void *)
{
for(a; a<5; a++)
{
cout << "Zahl: " << a << endl;
}
}
int main()
{
CInstanz pThread;
_beginthread( &pThread.scan, 0, NULL);
system("pause");
return 0;
}Die Fehlermeldungen:
error LNK2001: Nicht aufgelöstes externes Symbol ""public: static int CInstanz::a" (?a@CInstanz@@2HA)".
fatal error LNK1120: 1 nicht aufgelöste externe Verweise. Ich weis wirklich nicht wie ich dieses Problem beheben kann, weis einer eine Lösung?
(Bin C++ Beginner)