level 7
我想:
定义一个 T(不知道用什么){字符串1,字符串2,。。。字符串n}
一个条件判断
if(字符串==T)// 等于T中任意一个字符串。
{实现一个功能}
我想知道这个 T 用什么?
2013年12月19日 10点12分
1
level 1
char T[100]={"uiahscdfoq;juwfeoenafjeofiverkvf;h"}
话说 100 是数组大小(字符串大小)你随便定 (只要在范围内)
字符串的内容是我瞎输的
2013年12月19日 14点12分
5
level 11
#include <iostream>
#include <string>
using namespace std;
struct T
{
string s[50];
};
bool operator==(string & s, T & t)
{
int i(0);
while (i != 50)
if (s == t.s[i++])
return true;
return false;
}
int main()
{
string s("ff");
T t;
t.s[20] = "ff";
cout << (s == t);
}
2013年12月19日 14点12分
6
你这个能解释一下吗,我是新手
2013年12月19日 15点12分