I have three C++ files,like follows:
/*Test.h*/
Code:
#include <iostream.h>
class Test{
public:
Test();
};
/*Test.cpp*/
Code:
#include "Test.h"
Test::Test(){
cout<<"Test called";
}
/*a.cpp*/
Code:
#include "Test.h"
int main(int argc, char* argv[])
{
Test abc=new Test();
return 0;
}
When I run a.cpp,it raise following error:
[C++ Error] a.cpp(4): E2034 Cannot convert 'Test *' to 'Test'
Why raise above error? How to correct my code?
Thanks