How to fix error: C3867?

hey...i have written some codes and when i debug, this error showed up, what do i have to do?

me codes:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
int main()
{
	char read[MAX];
	int a[MAX] = { 0 }, b[MAX] = { 0 }, c[MAX] = { 0 }, la, lb, cntr;
	std::cin.get(read, MAX);
	if (std::cin.get == '\n')
	{
		for (int i = 0; i != MAX - 1; i++)
		{
			if (read[i] == '*' || read[i] == '/')
			{
.
.
.
.
.
std::cout << read[n];
			}


error C3867: 'std::basic_istream<char,std::char_traits<char>>::get': function call missing argument list; use '&std::basic_istream<char,std::char_traits<char>>::get' to create a pointer to member!

the error showed for this line: std::cin.get(read, MAX);
Last edited on
get': function call missing argument list;


"argument list" is the stuff you put in parenthesis when you call the function.

So "missing argument list" means you are missing the parenthesis. And in fact, that is the case:

1
2
3
if (std::cin.get == '\n')  //<- get missing parenthesis

if (std::cin.get() == '\n')  //<- should be this 
tnx a lot
Topic archived. No new replies allowed.