Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation fails with error: no match for ‘operator==’ #1

Open
aravindprasad opened this issue Mar 31, 2021 · 2 comments
Open

Comments

@aravindprasad
Copy link

The system is Ubuntu 20.04; GCC version: 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)

Here is a more detailed error. Happy to provide any more details.

g++ -o ../../bin/proflex main.cpp -lm -g -Wall -Wundef -Wshadow
In file included from main.cpp:52:
makechem.cpp: In member function ‘void list::add_record(int)’:
makechem.cpp:327:9: error: no match for ‘operator==’ (operand types are ‘std::ifstream’ {aka ‘std::basic_ifstream’} and ‘long int’)
327 | if( fp == NULL)
| ^
makechem.cpp:327:9: note: candidate: ‘operator==(int, long int)’
makechem.cpp:327:9: note: no known conversion for argument 1 from ‘std::ifstream’ {aka ‘std::basic_ifstream’} to ‘int’
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/vector:60,
from main.cpp:47:

@tanmoy7989
Copy link

@aravindprasad: Did this get solved? I tried to install and just faced the same error.

@rasbt
Copy link
Member

rasbt commented Feb 16, 2023

Maybe this related PR helps? #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants