1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
Info: Internal Builder is used for build
g++ -O0 -g3 -Wall -c -fmessage-length=0 -o username_password.o "..\\username_password.cpp"
..\username_password.cpp: In function 'int main()':
..\username_password.cpp:18:29: error: no matching function for call to 'getline(std::istream&, std::string&, const char [2])'
getline(cin, username, "\n");
^
..\username_password.cpp:18:29: note: candidates are:
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\string:53:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\locale_classes.h:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\ios_base.h:41,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ios:42,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
from ..\username_password.cpp:7:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\basic_string.tcc:1068: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)
getline(basic_istream<_CharT, _Traits>& __in,
^
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\basic_string.tcc:1068:5: note: template argument deduction/substitution failed:
..\username_password.cpp:18:29: note: deduced conflicting types for parameter '_CharT' ('char' and 'const char*')
getline(cin, username, "\n");
^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\string:52:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\locale_classes.h:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\ios_base.h:41,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ios:42,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
from ..\username_password.cpp:7:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\basic_string.h:2793: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>&)
getline(basic_istream<_CharT, _Traits>& __is,
^
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\basic_string.h:2793:5: note: template argument deduction/substitution failed:
..\username_password.cpp:18:29: note: candidate expects 2 arguments, 3 provided
getline(cin, username, "\n"); ^
|