Language: C++

/*
// Sample code to perform I/O:

#include <iostream>

using namespace std;

int main() {
	int num;
	cin >> num;										// Reading input from STDIN
	cout << "Input number is " << num << endl;		// Writing output to STDOUT
}

// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail
*/

// Write your code here
/*
// Sample code to perform I/O:
 
#include <iostream>
 
using namespace std;
 
int main() {
	int num;
	cin >> num;										// Reading input from STDIN
	cout << "Input number is " << num << endl;		// Writing output to STDOUT
}
 
// Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail
*/
#include<bits/stdc++.h>
using namespace std;
#define ll long long 
int fin=0,ans=0;
bool vis[200050];
int dfs(int x , vector <  int  > &v)
{
    if(vis[x]) return 0;
    vis[x]=true; ans++;
    for(auto it: v[x]) if(!vis[it]) dfs(it,v);
}
int main()
{
     int n,m;
     cin>>n>>m;
     vector <  int  > v(n+1);
     for(int i=0;i<m;i++)
     {
         int a,b;
         cin>>a>>b;
         v[a].push_back(b);
         v[b].push_back(a);
     }
     memset(vis,false,sizeof(vis));
     for(int i=1;i<=n;i++)
     {
         if(!vis[i])
         {
             ans=0;
             dfs(i,v);
         }
         fin=max(fin,ans);
     } 
     cout<<fin;
 
    }


Compiler output:
a.cc: In function 'int dfs(int, std::vector<int>&)':
a.cc:42:21: error: 'begin' was not declared in this scope
   42 |     for(auto it: v[x]) if(!vis[it]) dfs(it,v);
      |                     ^
a.cc:42:21: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
                 from a.cc:33:
/usr/include/c++/14/valarray:1238:5: note:   'std::begin'
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
In file included from /usr/include/c++/14/filesystem:53,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200:
/usr/include/c++/14/bits/fs_dir.h:608:3: note:   'std::filesystem::__cxx11::begin'
  608 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
a.cc:42:21: error: 'end' was not declared in this scope
   42 |     for(auto it: v[x]) if(!vis[it]) dfs(it,v);
      |                     ^
a.cc:42:21: note: suggested alternatives:
/usr/include/c++/14/valarray:1265:5: note:   'std::end'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/bits/fs_dir.h:613:3: note:   'std::filesystem::__cxx11::end'
  613 |   end(recursive_directory_iterator) noexcept
      |   ^~~
a.cc: In function 'int main()':
a.cc:53:15: error: request for member 'push_back' in 'v.std::vector<int>::operator[](((std::vector<int>::size_type)a))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   53 |          v[a].push_back(b);
      |               ^~~~~~~~~
a.cc:54:15: error: request for member 'push_back' in 'v.std::vector<int>::operator[](((std::vector<int>::size_type)b))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   54 |          v[b].push_back(a);
      |               ^~~~~~~~~
a.cc: In function 'int dfs(int, std::vector<int>&)':
a.cc:43:1: warning: control reaches end of non-void function [-Wreturn-type]
   43 | }
      | ^