int Freeman[8][2]={{1,0},{1,-1},{0,-1},{-1,-1},
{-1,0},{-1,1},{0,1},{1,1} };

解决方案 »

  1.   

    可以这样
    //myclass.h
    static int a[10]={1,1,1,1,1,1,1,1,1,1,1,1,1};class myclass
    {
    .................
    };
      

  2.   

    全局变量的定义放到.cpp里好一点
      

  3.   

    错误:
    ...Contour.cpp h:\vc\drawanalysissystem\contour.h(24in ンパイル)   :   error C2059:   Syntax error  :   '{' h:\vc\drawanalysissystem\contour.h (24)   :  error C2334:   Before '{' The main part of a function is disregarded.   Execution error of cl.exe
      

  4.   

    定义到.cpp文件中或用 wangxil的方法(去掉几个1就ok)
      

  5.   

    int frame[3][2]={{1,2},{3,4},{5,6}};
    这个肯定可以,因为我编译通过了。
      

  6.   

    在头文件里写 
    extern int ....
      

  7.   

    在class.h中声明:
    private:
        static int a[10];在class.cpp的空白地方中(不要在任何成员函数中)写入:int CClass::a[]={1,2,3,4,5,6,7,8,9,10};即可
      

  8.   

    magicwind2002 ok了,谢谢,谢谢大家