请问如何定义一个字符串?

解决方案 »

  1.   

    Dim s As Strings = "这就是一个字符串~~"
      

  2.   

    Dim Str as String '定义字符串
    Str="String" '赋值
      

  3.   

    dim str as string 
    str="字符串内容"
      

  4.   

    #include <iostream>
    #include <stdlib.h>
    #include <string>using namespace std;int main(int argc, char *argv[])
    {
      string s = "Hello World!";  
      char *sl="Good,My friend!";
      
      cout<<s<<endl;
      cout<<sl<<endl;
      system("PAUSE");
      return 0;
    }
      

  5.   

    dim a(10) as string