Q: why is it that  doesn't work sometimes and using namespace std work in c++ I am trying code at hackerrank but isn't working.
#include<iostream>
using namespace std;

int add(int b, int c)
{
    return b+c;
}

int main()
{
    int a,b,c,i,sum;
    cin>>a;
    for(i=1;i<=a;i++) 
    {
        std::cin>>b>>" ">>c; 
        sum=add(b,c);
        cout<<sum<<"\n";
    }
    return 0;
}

Error:
error : !cannot bind 'std::basic_istream::__istream_type {aka std::basic_istream}' lvalue to 'std::basic_istream&&'


A: You cannot do this
std::cin >> b >> " " >> c; 

You are trying to input a value into b and c which is fine, but this makes no sense
std::cin >> " "

That line should just be
std::cin >> b >> c; 

