I am writing a program to show the amount of sentences I inputted. However, it showed an error of "no match for 'operator!=' in '(&std::cin)->std::basic_istream<_CharT, _Traits>::getline [with _CharT = char, _Traits = std::char_traits<char>](((char*)(&a)), 300) != -0x000000001' " for my code. Please help me out with my code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include<cstdio>
#include<iostream>
#include<cstring>
usingnamespace std;
int main(){
char a[301];
int b=0,len;
while(cin.getline(a,300)!=EOF){
b++;
}
printf("%d\n",b);
return 0;
}