[Solved] I am getting an error regarding std::istream and int x [closed]


You can only read into a variable:

std::cin >> x;

but you can output the value of any (suitably typed) expression:

std::cout << sqr(x);

13

solved I am getting an error regarding std::istream and int x [closed]