c++中
#define AAAAA abcdc#中在哪里定义才能全局都可用呢?

解决方案 »

  1.   

    using System;public class TestClass
    {
    private  const  string strXmlPath = @"c:\xml.xml";
    .........................................
    }
      

  2.   

    public class Form1 : System.Windows.Forms.Form
    {
    private System.Windows.Forms.TextBox textBox1;
    private System.Windows.Forms.Button button1;
    static int aaa;//这里
      

  3.   

    在C#中没有全局变量的说法。
    你可以使用静态变量或者使用Singleton模式来代替
      

  4.   

    c#中对应于c++的全局字符串常量在哪里定义?还在c++里,微软没把它带到c#里来。
      

  5.   

    c++中
    #define AAAAA abcd
    这个是宏!不是全局变量。
      

  6.   

    沒有全局變量的。你應該使用static的變量。