fork download
  1. #include <iostream>
  2. #include <stdio.h>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. char st[50],a[27];
  8. cin.getline (st);
  9. char S='a';
  10. for(b=0;b<26;b++);
  11. for(int i=0; st[i]!=st[b];i++);
  12. {
  13. if (st[i]!==st[b]) cout<<"Raznobykvennie est";
  14. else cout<<"Raznobykvennih net";
  15. return 0;
  16. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:8:17: error: no matching function for call to ‘std::basic_istream<char>::getline(char [50])’
  cin.getline (st);
                 ^
In file included from /usr/include/c++/8/iostream:40,
                 from prog.cpp:1:
/usr/include/c++/8/istream:647:5: note: candidate: ‘std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::getline(std::basic_istream<_CharT, _Traits>::char_type*, std::streamsize, std::basic_istream<_CharT, _Traits>::char_type) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::char_type = char; std::streamsize = long int]’
     basic_istream<char>::
     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/istream:647:5: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/8/istream:427:7: note: candidate: ‘std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::getline(std::basic_istream<_CharT, _Traits>::char_type*, std::streamsize) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>; std::basic_istream<_CharT, _Traits>::char_type = char; std::streamsize = long int]’
       getline(char_type* __s, streamsize __n)
       ^~~~~~~
/usr/include/c++/8/istream:427:7: note:   candidate expects 2 arguments, 1 provided
prog.cpp:10:6: error: ‘b’ was not declared in this scope
  for(b=0;b<26;b++);
      ^
prog.cpp:11:25: error: ‘b’ was not declared in this scope
  for(int i=0; st[i]!=st[b];i++);
                         ^
prog.cpp:13:9: error: ‘i’ was not declared in this scope
  if (st[i]!==st[b]) cout<<"Raznobykvennie est";
         ^
prog.cpp:13:13: error: expected primary-expression before ‘=’ token
  if (st[i]!==st[b]) cout<<"Raznobykvennie est";
             ^
prog.cpp:13:17: error: ‘b’ was not declared in this scope
  if (st[i]!==st[b]) cout<<"Raznobykvennie est";
                 ^
prog.cpp:16:1: error: expected ‘}’ at end of input
 }
 ^
prog.cpp:6:1: note: to match this ‘{’
 {
 ^
stdout
Standard output is empty