How do you make a static function/method in c++? -


I'm just learning C ++ I already know C and Java what will anyone show me how I For example, I'm writing a student class with standard information (name, student number, GPA, etc.) for practice, for example, I can create a static method / function like C ++. I want to create a static method / function that will return the total number of student object created in Java I know that it will be:

  Public Stable Ent Nom students () {Total students To return; // global variable}   

thanks :)

here C ++

  Student of the class {Private: Stable Entry Total Students Prepared; Public: stable intermediates (); }; Int student :: Total students = 0; Int Student :: Match Points () {Return to Total Students; }   

should be included in your C ++ text book

Comments

Popular posts from this blog

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -