摘要: #include <string.h>#include <iostream>using namespace std;int main(){char d[256]="hello";//char *s=" word";char s[256]=" word";strcat(d,s);cout<<d;getchar();return 0;} 阅读全文
posted @ 2011-09-21 11:48 byfei 阅读(253) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <vector>using namespace std;struct NODE{int m_nRoleID;int m_nScore;string m_strROleName;NODE() :m_nRoleID(1), m_nScore(0),m_strROleName("byfei"){}NODE(const int nRoleID, const int nScore,const string strRoleName) :m_nRoleID(nRoleID), m_nScore(nScore) 阅读全文
posted @ 2011-09-21 10:33 byfei 阅读(734) 评论(0) 推荐(0) 编辑
摘要: 1.声明: 一个vector类似于一个动态的一维数组。 vector a; //声明一个元素为int类型的vector a vectot a; //声明一个元素为MyType类型的vector a 这里的声明的a包含0个元素,既a.size()的值为0... 阅读全文
posted @ 2011-09-21 10:33 byfei 阅读(59) 评论(0) 推荐(0) 编辑