AdamGeober AdamGeober - 1 month ago 7
C++ Question

Why does a plain URI written in c++ code work?

I put URI in code and the compiler will not throw any error, why (explain please)

#include <iostream>

using namespace std;

int main()
{
http://stackoverflow.com/
cout << "Hello World!" << endl;
return 0;
}

Answer

Identifier followed by : becomes a label in C++. Anything followed by // becomes a comment.