In fact, http followed by a colon is considered a C ++ label that you can use in goto (e.g. goto http; ), and the rest (i.e. //www.google.co.in ) is considered as a single line comment. That is why it compiles.
More details
void your_function() { http:
By the way, I do not think that the example you wrote will be compiled. There must be at least one line of code after the URL, only after that it compiles on my PC. I am using MSVC ++ 2008.
Nawaz source share