#include<bits/stdc++.h>
using namespace std;
int count;
int main()
{
    int k;
    cin>>k;
    count=k;
    cout<<count;
    return 0;
}
I am trying to change the value of 'count' (Global Variable) in main function but getting reference to 'count' is ambigous error in C++. But the same kind of code works well in C. Please help me.
 
     
    