#include<iostream>
using namespace std;
int main(){
cout<"Yes";
}
it compiles, but when it runs, it does nothing. this is a compilation error elsewhere. compiler is gcc 4.9.2
compared with
#include<iostream>
using namespace std;
int main(){
cout<<"Yes";
}
it has a missing '<' but it still compiles.
I expected it to be a compilation error, as with variables, like this:
> 6 6 C:\Users\Denny\Desktop\Codes\compileerror.cpp [Error] no match for
> 'operator<' (operand types are 'std::ostream {aka
> std::basic_ostream<char>}' and 'int')
this happens with the code below as well.
#include<iostream>
using namespace std;
int main(){
cin>"Yes";
}
edit: The same thing happens for
#include<iostream>
int main(){
std::cout<"Yes";
}
plus, I enabled compiler warnings and there are none.