Visual C++: Comment accéder aux méthodes statique d’une classe

Author:


{filelink=13221}

#include "stdafx.h"
using namespace System;

class MembreStatic
{
private:
    const static Int32 x = 42;
public:
   static Int32 get_x()
   {
      return x*10;
   }
};

Int32 main()
{
    Console::WriteLine ( MembreStatic::get_x() );
	Console::ReadLine();
    return 0;
}


Leave a Reply

Your email address will not be published. Required fields are marked *