Posts

Showing posts from June, 2011

ActionScript 3.0程式最佳化

ActionScript 3.0程式最佳化(一)以及Vector資料類型簡介
http://uh.9ria.com/space-6264-do-blog-id-2233.htmlActionScript 3.0程式最佳化(二)
http://uh.9ria.com/space-6264-do-blog-id-2234.html

The difference of dedicated server and cloud computing

Using Interfaces in C++

Method 1.
#include "objbase.h"  //~~~!! for interface identifier
#include "stdio.h"


interface IAnimal
{
    virtual void Forward() = 0;
    virtual void Eat() = 0;
};

class CBird : public IAnimal
{
virtual  void Forward()
    {
        printf( "walk 3 steps \n" );
    };
virtual void Eat()
    {
        printf( "eat 5 rice \n" );
    };
};


void main()
{  
    IAnimal *pAnm = NULL;
    CBird bird;

    pAnm = &bird;
    pAnm->Forward();
  }

In this method, you need to #include "objbase.h". And write pure virtual func. in the interface class.

Method 2. In VS7 Microsoft has judged __interface introduction in c++ compiler( macOS c++  support?...)  In the msdn  __interface definition:
Can inherit from zero or more base interfaces.Cannot inherit from a base class.Can only contain public, pure virtual methods.Cannot contain constructors, destructors, or operators.Cannot contain static methods.Cannot contain data members; properties are allowed.Th…

Cloud computing