I am new on this community. I have this error 0x0FDBEA10 (ucrtbased.dll) in Visual Studio 2017. I have tried exactly the same code in CodeBlocks (version 17.12). In CodeBlocks the program has stopped running when I have introduced arrays smaller than 3 (or equal with 3). How can I solve this error? My code should count the words which contain the preffix "are". I have to use only this variables s, i, n and this command cin. If my code isn't correctly, I hope someone can bring me new ideas.

I have tried my code in Visual Studio 2017 and CodeBlocks (version 17.12). The error 0x0FDBEA10 (ucrtbased.dll) is from VS.

#include "pch.h" // I am not using everyday VS and I think this library is standard
#include <iostream>
using namespace std;
int main()
{
    unsigned n,i;
    char s[20];
    n = 0;
    for(i=1;i<=3;i++)
    {
        cin >> s; // I have to use cin in my code
        if (strcmp(strstr(s, "are"), "are") == 0) n++; // This is row with that error
    }
    cout << n;
    system("pause");
}

If the string array have this words (separated with space). For example for this string array {in, mancare, areolare, prezentarea} the code should display 1 (because only the word "mancare" has the preffix "are"). The actual result in VS 2017 is 0x0F6CEA10 (ucrtbased.dll). In CodeBlocks the program has stopped working when I introduced words smaller than 3 (or equal with 3).

0 Answers