Runtime Error

seokma97 Reply 9 years 30 weeks ago
#include <stdio.h> #include <vector> using namespace std; vector<char> vec; int main() { char s1[1005]; char s2[1005]; char ch; int len1,len2,i=0; while ((ch=getchar())!='\n') s1[i++]=ch; len1=i; i=0; while ((ch=getchar())!='\n') s2[i++]=ch; len2=i; for (int j=0;j<len1;j++) { char c=s1[j],def=0; for (int k=0;k<len2;k++){ if (c==s2[k]){ def=1; break; } } if (def==0) vec.push_back(c); def=0; } for (int o=0;o<vec.size();o++){ printf("%c",vec[o]); } return 0; } Runtime Error가 나는 이유를 잘 모르겠습니다!
booksky Reply 9 years 30 weeks ago
https://withcs.net/t/413 참고하시기 바랍니다.
seokma97 Reply 9 years 30 weeks ago
감사합니다^^.