R
rajkirangrandhi
Hi,
I have several classes written in Java that I am trying to convert into
C++. They are fairly simple classes, no gui stuff etc, just some math
routines. I was able to do it without any problem. However I wish to
separate the definitions of the member functions from the class body
and put it in a separate file. I was wondering if there is some utility
which does that. Assuming I have the following class:
class Somethingublic Parent
{
public:
Something(int a_, double b_){a = a_;b=b_;}
int get_a()const{return a;}
int get_b()const{return b;}
private:
int a;
double b;
};
I want to convert it into the following header and source files:
something.h:
class Somethingublic Parent
{
public:
Something(int a_, double b_);
int get_a()const;
int get_b()const;
private:
int a;
double b;
};
something.cpp:
Something::Something(int a_, double b_){a = a_;b=b_;}
int Something::get_a()const{return a;}
int Something::get_b()const{return b;}
Is there some way to do this?
Thanks,
Rajkiran
I have several classes written in Java that I am trying to convert into
C++. They are fairly simple classes, no gui stuff etc, just some math
routines. I was able to do it without any problem. However I wish to
separate the definitions of the member functions from the class body
and put it in a separate file. I was wondering if there is some utility
which does that. Assuming I have the following class:
class Somethingublic Parent
{
public:
Something(int a_, double b_){a = a_;b=b_;}
int get_a()const{return a;}
int get_b()const{return b;}
private:
int a;
double b;
};
I want to convert it into the following header and source files:
something.h:
class Somethingublic Parent
{
public:
Something(int a_, double b_);
int get_a()const;
int get_b()const;
private:
int a;
double b;
};
something.cpp:
Something::Something(int a_, double b_){a = a_;b=b_;}
int Something::get_a()const{return a;}
int Something::get_b()const{return b;}
Is there some way to do this?
Thanks,
Rajkiran