关于字符串

Think Nothing 2003-09-12 10:29:09
请问如何定义一个字符串?
...全文
33 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
juror 2003-09-12
  • 打赏
  • 举报
回复
dim a(10) as string
Think Nothing 2003-09-12
  • 打赏
  • 举报
回复
错了,我是想问如何定义字符串数组

yunfeng007 2003-09-12
  • 打赏
  • 举报
回复
#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;
}
zmrok 2003-09-12
  • 打赏
  • 举报
回复
dim sssss as string
战箫 2003-09-12
  • 打赏
  • 举报
回复
dim str as string
str="字符串内容"
officecn 2003-09-12
  • 打赏
  • 举报
回复
Dim Str as String '定义字符串
Str="String" '赋值
strongfisher 2003-09-12
  • 打赏
  • 举报
回复
dim str as string
射天狼 2003-09-12
  • 打赏
  • 举报
回复
Dim s As String

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

7,789

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧