前田稔(Maeda Minoru)の超初心者のプログラム入門
#include <stdio.h> #include <vector> #include <string> char str_data[][20]= { "0123456789", "abcd", "ABCDEFGHIJKLMN", "opqrstu", "VWXYZ" }; int main() { using namespace std; vector<string> str; int i; for(i=0; i<5; i++) str.push_back(str_data[i]); for(i=0; i<5; i++) printf("%s\n",str[i].c_str()); return 0; } |