结构体中字符串赋值

#include <iostream> using namespace std; struct student { int num; char name[10]; }; int main() { student st; st.num = 10; //st.name = "linjunjie"; //字符串不能用=赋值 strcpy(st.name,
相关文章
相关标签/搜索