提交 6a280ccd 编写于 作者: S Shen Zhi

why C++'s grammar has wrong here

上级 56f327a5
...@@ -1537,17 +1537,9 @@ int tscBuildCreateTableMsg(SSqlObj *pSql, SSqlInfo *pInfo) { ...@@ -1537,17 +1537,9 @@ int tscBuildCreateTableMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
//what pCreate->tableName point is a fixed char array which size is 237 //what pCreate->tableName point is a fixed char array which size is 237
//what p->fullname point is a char* //what p->fullname point is a char*
//before the time we copy p->fullname to pCreate->tableName , we need to check the length of p->fullname //before the time we copy p->fullname to pCreate->tableName , we need to check the length of p->fullname
try { while (strlen(p->fullname) > 237) {
if (strlen(p->fullname) > 237) { print("length of p->fullname should not exced 237\n");
throw runtime_error("length of fullname should be less than 237"); scanf("%s", p->fullname);
}
}
catch (runtime_error err) {
cout << err.what() <<"\nMay you can reenter"<< endl;
while (strlen(p->fullname) > 237) {
scanf("%s", p->fullname);
}
} }
strcpy(pCreate->tableName, p->fullname); strcpy(pCreate->tableName, p->fullname);
pCreate->igExists = (p->igExist)? 1 : 0; pCreate->igExists = (p->igExist)? 1 : 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册