how does url within function body get compiled
问题 I just pasted a url to my code, and forgot to comment it, but I was surprised to see MSVC++ compiled it successfully. My code is like this, void my_function() { http://www.google.co.in/ } How come this gets compiled by MSVC++? 回答1: Actually, http followed by a colon is treated as a label by C++, which you can use in goto statements (like goto http; ), and the rest (i.e //www.google.co.in ) is treated as single line comment. That's why it gets compiled. See more, void your_function() { http:/