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

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -