ProgrammingRacoon
New Coder
Hello I'm fairly new to programming and trying to code a project I came across this error and after a few weeks I cannot do anything about it. Does anyone know what I have to change?
Error says: "An invalid parameter was passed to a function that produces an unrecoverable error if invalid parameters are specified."
Thanks for everything.
Error says: "An invalid parameter was passed to a function that produces an unrecoverable error if invalid parameters are specified."
C++:
#include <iostream>
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int main()
{
string posCorrecta;
string posIncorrecta;
string palabra2;
string wordle = "fuera";
string palabra = "fuese";
bool acierto = true;
for (int i = 0; i < 5; i++) {
if (palabra[i] == wordle[i]) {
posCorrecta[i] = palabra[i];
}
else {
for (int k = 0; k < 5; k++) {
if (palabra[i] == wordle[k]) {
posIncorrecta[i] = palabra[i];
}
}
}
}
if (palabra == wordle) {
acierto = true;
}
for (int j = 0; j < 5; j++) {
if (posCorrecta[j] == palabra[j]) {
palabra2 = palabra2 + "[" + posCorrecta[j] + "]";
}
else {
if (posIncorrecta[j] == palabra[j]) {
palabra2 = palabra2 + "(" + posIncorrecta[j] + ")";
}
else {
palabra2 = palabra2 + palabra[j];
}
}
}
palabra = palabra2;
};
Thanks for everything.