Language: C++

#include <iostream>
#include <string>

using namespace std;

int main()
{
 	int count = 0;
  while(1){
  	string w;
  	cin = w;
	for (int i = 0 ; i <= w.size ; i++ ){
		if (isupper(w[i])){
			w[i] = tolower(w[i]);
		}


	}

	string t;

	while(1){
		cin >> t;

		if (t == "end_of_text")break

		for (int j = 0 ; j <= t.size ; j++ ){
			if ( isupper(w[j])){
				w[i] = tolower(w[j]);
			}
		}

		if (t = w )count++;

	}

  }
    cout << count << emdl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: no match for 'operator=' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   11 |         cin = w;
      |               ^
In file included from /usr/include/c++/14/iostream:42,
                 from a.cc:1:
/usr/include/c++/14/istream:718:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator=(std::basic_istream<_CharT, _Traits>&&) [with _CharT = char; _Traits = std::char_traits<char>]'
  718 |       operator=(basic_istream&& __rhs)
      |       ^~~~~~~~
/usr/include/c++/14/istream:718:33: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::basic_istream<char>&&'
  718 |       operator=(basic_istream&& __rhs)
      |                 ~~~~~~~~~~~~~~~~^~~~~
a.cc:12:33: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   12 |         for (int i = 0 ; i <= w.size ; i++ ){
      |                               ~~^~~~
      |                                     ()
a.cc:25:45: error: expected ';' before 'for'
   25 |                 if (t == "end_of_text")break
      |                                             ^
      |                                             ;
   26 | 
   27 |                 for (int j = 0 ; j <= t.size ; j++ ){
      |                 ~~~                          
a.cc:27:41: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   27 |                 for (int j = 0 ; j <= t.size ; j++ ){
      |                                       ~~^~~~
      |                                             ()
a.cc:29:35: error: 'i' was not declared in this scope
   29 |                                 w[i] = tolower(w[j]);
      |                                   ^
a.cc:33:23: error: could not convert 't.std::__cxx11::basic_string<char>::operator=(w)' from 'std::__cxx11::basic_string<char>' to 'bool'
   33 |                 if (t = w )count++;
      |                     ~~^~~
      |                       |
      |                       std::__cxx11::basic_string<char>
a.cc:38:22: error: 'emdl' was not declared in this scope
   38 |     cout << count << emdl;
      |                      ^~~~