C + + fun variable name, subversion of all textbook VisualStudio

Source: Internet
Author: User

GCC is not involved in this fun.

All tutorials will tell you that C + + variable names, class names, and function names should be letters, numbers, and underscores that begin with a character letter or underscore, like this:

int _abc123;

In fact, VisualStudio does not adhere to this specification, but is broader, which can:

#include <stdio.h>#include<tchar.h>#defineIf the IF#definePrint printf#defineBack to return#defineStart#defineEnd#defineMain function _tmain#defineinteger int//Pure Chinese C + + programmingInteger main function (integer parameter, _tchar*argv[]) Start if (1>0Print"1"); Printing ("Fyter Print%d", parameters); Return0; end

This is a program that can be compiled at vs.

So for such a compiler, the variable name should be:

Non-visual characters are not allowed, like tab,\n,\r ...

Operators are not allowed, like =-+*/...

Keywords are not allowed, like const,int,class ...

Any character other than the

C + + fun variable name, subversion of all textbook VisualStudio

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.