0

I'm having problems with comparing two strings in case-insesitive way. I've tried lots of methods(functions) like strcasecmp, stricmp, strcmpi, etc. I had imported the libraries where those functions belong but still it can't seem to detect them.

Here is my code:

#include <bits/stdc++.h>
#include <string.h>
#include <cstring>
#include <mem.h>

using namespace std;

int main() {

  char s1[100], s2[100];
  cin >> s1;
  cin >> s2;
  cout << strcasecmp(s1, s2) << endl;

  return 0;
}
ERROR: project.cpp|13|error: 'strcasecmp' was not declared in this scope

Does anybody have suggestions on how to fix it?

Thank you.

Blastfurnace
  • 18,411
  • 56
  • 55
  • 70
Grantis
  • 41
  • 1
  • 3

0 Answers0