I would think this is the problem
Code:
char simbolos[]={};
strcpy(simbolos,archivou.c_str());
Your allocating 'simbolos' 0 bytes of memory, then your putting stuff into it with strcpy (length of 'archivou.c_str()' bytes of memory). Two alternatives:
- change 'char simbolos[]={};' to 'char * simbolos', and dynamically allocate enough memory to it, based on the length of the 'archivou' string entered.
- or preferably: use the 'archivou' variable itself, theres no need for another variable (or array of variables such as char[]). You can use array syntax on strings, so just do the checks on the actual string, like
Code:
if ( archivou[i] < 47 //...
etc.