Problem about defining a class

1
2
3
4
5
6
7
class Molecule
{
public:
    int state;
    Molecule();
    void Generatepoint(int nMolecule,int nx[],int ny[]);
};


When I define a member function, can I do it this way?Is int nx[],int ny[] wrong?
Yes you can, but int state; would typically be private

"Is int nx[],int ny[] wrong?"

No
int nx[], int ny[] is fine
they equal to int* nx,int* ny
Last edited on
Topic archived. No new replies allowed.