I created this but i am getting linking errors but i don't know why...
SysInfo.h
#include <iostream>
class SysInfo
{
public:
SysInfo();
~SysInfo();
private:
};
SysInfo.cpp
#include "SysInfo.h"
using namespace std;
SysInfo::SysInfo()
{
cout << "Object is being created" << endl;
}
SysInfo::~SysInfo()
{
cout << "Object is being deleted" << endl;
}
Main
#include <tchar.h>
#include "Sysinfo.h"
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
SysInfo inf;
getchar();
return 0;
}
Message
warning C4930: 'SysInfo inf(void)': prototyped function not called (was a variable definition intended?)
The issue is solved. The code you see is corrected code. I changed #include <SysInfo.h>
to #include "SysInfo.h"
and turned off the pre compile setting in visual studio 2012. That was giving errors ass well.