Hi buddy, do you know how to convert this C++ code into Java? I'm still fairly new to Java, hope you can guide meMicrosoft Visual C++ 2010
#include "stdafx.h"
#include<iostream>
using namespace std;
template<typename T>
class myShape{
protected:
T height, width;
};
template<typename T>
class CSquare : public myShape<T>
{
public:
CSquare(int height, int width){
this->height = height;
this->width = width;
}
T area(){
return this->height * this->width;
}
};
int _tmain(int argc, _TCHAR* argv[])
{
CSquare<int> *s = new CSquare<int>(3,4);
cout<<s->area();
}
-:...by the way, if you familiar with C++, please help me here to fix the Turbo C++ 4.5 code. Thanks friends