#include <iostream>
#include <stdlib.h>
using namespace std;
int main(int argc, char* argv[]) {
std:: cout<<"hello world";
std::cout<<"i am surprise<"<<std::endl;
return (EXIT_SUCCESS);
}
It is very strange because I am using netbeans in Ubuntu 10.04 and run this code. What happens here really makes me surprised; every line of code is marked with red line. For example:
- first line indicates that it can't find indicator iostream or can't find file iostream;
- second line can't find file stdlib;
- third line unable to resolve identifier std and so on,
- but it compiles fine and shows me the result "hello world i am surprise"
Please explain why is this happens?