memo/program/C,C++/strtok をテンプレートにして作成
ページ一覧
編集メニュー >
新規作成
編集
コピー
名前の変更
アップロード
添付ファイル一覧
バックアップ
開始行:
* strtok [#t9e9fc1c]
char* strtok(char* s1, const char* s2)
文字列s1をs2で分割して返す。使い方はいろんなサイトである...
string s[100];
char* ctemp;
strcpy(c_copy,c_org);
ctemp = strtok(c_copy,";");
n=0;
while(ctemp !=NULL){
s[n]=(string)ctemp; //remove left/right spaces
n++;
ctemp = strtok(NULL,";");
}
他の書き方もあるけれど、c_orgが";"のみで構成されている場...
終了行:
* strtok [#t9e9fc1c]
char* strtok(char* s1, const char* s2)
文字列s1をs2で分割して返す。使い方はいろんなサイトである...
string s[100];
char* ctemp;
strcpy(c_copy,c_org);
ctemp = strtok(c_copy,";");
n=0;
while(ctemp !=NULL){
s[n]=(string)ctemp; //remove left/right spaces
n++;
ctemp = strtok(NULL,";");
}
他の書き方もあるけれど、c_orgが";"のみで構成されている場...
ページ名:
and
or
Menu
kondowiki
memo
exp
link
#lsx
Counter: 0, today: 0, yesterday: 0