Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: static properties
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Joel

Posts: 16
Registered: 5/15/09
static properties
Posted: Feb 14, 2013 11:51 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

In C++ class data members may be declared static. That is, regardless of the number of instances that exist, only one copy of the static data exists which is accessible to all instances of the class.

Is there any way to implement this type of functionality within MATLAB?

C++ Syntax, as a header.
class person
{
public:
person(string name);
~person();
string setName();
string getName();

static int getNumPeople();
private:
string name;

static int numPeople; // I want to implement the functionality of this property.
};



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.