Problems with cin :: getline in CDT Builder

I use CDT Internal Builder and MS Visual C ++ Toolchain in my project in Eclipse. The problem is that the compiler swears:

Invalid arguments ' Candidates are: std::basic_istream<char,std::char_traits<char>> & getline(char *, ?) std::basic_istream<char,std::char_traits<char>> & getline(char *, ?, char) ' 

when i click something like this:

 #include <fstream> using namespace std; int main() { fstream fin; char buf[256]; fin.open("in.txt", fstream::in); fin.getline(buf, 256); // !!!!! return 0; } 

What is the problem?

+4
source share
1 answer

You can read about this problem here: http://www.eclipse.org/forums/index.php/mv/msg/274600/776516/#msg_776516

Basically, this is a bug with the eclipse code analysis plugin (CODAN).

0
source

Source: https://habr.com/ru/post/1403618/


All Articles