#include <iostream>
#include <cmath>
#include <cstdlib>
#include <climits>
#include <cfloat>
#include <cstring>
#include <string>
using namespace std;
struct news
{
char a[10];
int n;
float r;
};
int main()
{
news k;
cin >> k;
cout << k.a << endl;
cout << k.n << endl;
cout << k.r << endl;
return 0;
}
エラーの全画面が表示されます。誰でもこの問題を解決する方法を知っていますか? ありがとうございました!
test.cc: 関数 'int main()' 内: test.cc:20: エラー: 'std::cin >> k' の 'operator>>' に一致しません /usr/include/c++/4.2.1/ istream:131: 注: 候補は次のとおりです: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>& (*)(std: :basic_istream<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits] /usr/include/c++/4.2.1/istream:135: 注意: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_ios<_CharT, _Traits>& (*)(std::basic_ios<_CharT, _Traits>&)) [with _CharT = char, _Traits = std ::char_traits] /usr/include/c++/4.2.1/istream:142: 注意: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char, _Traits = std::char_traits] /usr/include/c++/4.2.1/ istream:178: 注: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char, _Traits = std::char_traits] /usr/include /c++/4.2.1/istream:182: 注意: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char, _Traits = std ::char_traits] /usr/include/c++/4.2.1/istream:185: 注意: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [ with _CharT = char, _Traits = std::char_traits] /usr/include/c++/4.2.1/istream:189: 注意: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char, _Traits = std::char_traits] /usr/include/c++/4.2.1/istream:192: 注意: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>> (unsigned int&) [with _CharT = char, _Traits = std::char_traits] /usr/include/c++/4.2.1/istream:196: 注意: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT , _Traits>::operator>>(long int&) [with _CharT = char, _Traits = std::char_traits] /usr/include/c++/4.2.1/istream:200: 注意: std::basic_istream<_CharT, _Traits >& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char, _Traits = std::char_traits] /usr/include/c++/4.2.1/istream:205: 注: std::basic_istream<_CharT, _Traits>& std: :basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char, _Traits = std::char_traits] /usr/include/c++/4.2.1/istream:209: 注: std:: basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char, _Traits = std::char_traits] /usr/include/c++/4.2.1 /istream:214: 注意: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char, _Traits = std::char_traits] /usr/ include/c++/4.2.1/istream:218: 注:std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char, _Traits = std::char_traits] /usr/include/c++/4.2.1 /istream:222: 注: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char, _Traits = std::char_traits] /usr /include/c++/4.2.1/istream:226: 注意: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char, _Traits = std::char_traits] /usr/include/c++/4.2.1/istream:250: 注意: std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(std ::basic_streambuf<_CharT, _Traits>*) [with _CharT = char, _Traits = std::char_traits]