Job 7236

Owner
Cristian Vlad-Alexandru
Problem
Peculiar Times
Contest
MindCoding 2015 Round 1
Source
0.68KB
Result
Compile error (Non-zero exit status: 1)

Compiler output

prog.cpp: In function 'int main()':
prog.cpp:23:23: error: no matching function for call to 'getline(std::ifstream&, int&)'
prog.cpp:23:23: note: candidates are:
In file included from /usr/include/stdio.h:927:0,
                 from /usr/include/c++/4.7/cstdio:44,
                 from /usr/include/c++/4.7/ext/string_conversions.h:39,
                 from /usr/include/c++/4.7/bits/basic_string.h:2814,
                 from /usr/include/c++/4.7/string:54,
                 from /usr/include/c++/4.7/bits/locale_classes.h:42,
                 from /usr/include/c++/4.7/bits/ios_base.h:43,
                 from /usr/include/c++/4.7/ios:43,
                 from /usr/include/c++/4.7/istream:40,
                 from /usr/include/c++/4.7/fstream:40,
                 from prog.cpp:8:
/usr/include/x86_64-linux-gnu/bits/stdio.h:116:1: note: __ssize_t getline(char**, size_t*, FILE*)
/usr/include/x86_64-linux-gnu/bits/stdio.h:116:1: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/4.7/string:54:0,
                 from /usr/include/c++/4.7/bits/locale_classes.h:42,
                 from /usr/include/c++/4.7/bits/ios_base.h:43,
                 from /usr/include/c++/4.7/ios:43,
                 from /usr/include/c++/4.7/istream:40,
                 from /usr/include/c++/4.7/fstream:40,
                 from prog.cpp:8:
/usr/include/c++/4.7/bits/basic_string.h:2792:5: note: template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(std::basic_istream<_CharT, _Traits>&, std::basic_string<_CharT, _Traits, _Alloc>&)
/usr/include/c++/4.7/bits/basic_string.h:2792:5: note:   template argument deduction/substitution failed:
prog.cpp:23:23: note:   mismatched types 'std::basic_string<_CharT, _Traits, _Alloc>' and 'int'
In file included from /usr/include/c++/4.7/string:55:0,
                 from /usr/include/c++/4.7/bits/locale_classes.h:42,
                 from /usr/include/c++/4.7/bits/ios_base.h:43,
                 from /usr/include/c++/4.7/ios:43,
                 from /usr/include/c++/4.7/istream:40,
                 from /usr/include/c++/4.7/fstream:40,
                 from prog.cpp:8:
/usr/include/c++/4.7/bits/basic_string.tcc:1070:5: note: template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(std::basic_istream<_CharT, _Traits>&, std::basic_string<_CharT, _Traits, _Alloc>&, _CharT)
/usr/include/c++/4.7/bits/basic_string.tcc:1070:5: note:   template argument deduction/substitution failed:
prog.cpp:23:23: note:   mismatched types 'std::basic_string<_CharT, _Traits, _Alloc>' and 'int'
prog.cpp:18:11: warning: unused variable 'a' [-Wunused-variable]
prog.cpp:18:17: warning: unused variable 'b' [-Wunused-variable]

Questions?

Sponsors Gold