Creating static const member of a class.

L

Luca Cerone

Dear all,
my class has to contain a vector of double that is common to all
the objects of that class, and can't be changed during the course
of execution.

As such I declare it as static const like this:

(in myClass.h)

class myClass{
public:

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top