I, of course, are not the most experienced programmer, but why after compiling this code:
#include <iostream> #include <string> using namespace std; int main(int argc, char** argv) { string s; cin >> s; int N = 0; for ( int i = 0 ; i < s.size() ; i++ ){ if (s[i] != '_') N++; } string mas[N]; int i = 0; int j = 0; int d = 1; while ( i < N ){ while (s[j] != '_' && j < s.size()){ if ( s[j] != s[d] ) int e = d; mas[i] = mas[i] + s[j]; d++; if ( d == '_' ){ d = e + 1; } } i++; j++; } cout << mas[i]; return 0; } Dev produces this error: [Error] 'e' was not declared in this scope
ifis limited to this instruction, so that the declarationint e = dceases to be visible already in the next line. - Harry