「C++」string型からint型に変換するサンプル
サンプルコード
#include <stdio.h>
#include <string>
int main() {
std::string cftStr = "6688";
int num = atoi(cftStr.c_str());
printf("数値:%d\n", num);
return 0;
}
Coding Changes the World
サンプルコード
#include <stdio.h>
#include <string>
int main() {
std::string cftStr = "6688";
int num = atoi(cftStr.c_str());
printf("数値:%d\n", num);
return 0;
}