Personal C + + coding specification

Source: Internet
Author: User

(a) variable naming

int I is prefixed

int[] arr as prefix

int* Pi as Prefix

Unsigend int UI is prefixed

Unsigend int* Pui as Prefix

Short S is prefixed

short* PS as Prefix

Unsigend short us as prefix

Unsigend short* pus as prefix

Long L is prefixed

long* Pl as Prefix

Unsigend Long ul as prefix

Unsigend long* Pul as prefix

Float F is prefixed

float* PF as Prefix

Double D as Prefix

double* PD as Prefix

Char c is prefixed

Char[] sz as prefix

Char* pointing to a single character pc as prefix, pointing to string psz as prefix

wchar_t WC as Prefix

wchar_t[] Wsz as prefix

wchar_t* points to a single wide character PwC as a prefix, pointing to a wide string pwsz as a prefix

String STR is prefixed

string[] Arrstr as prefix

string* pstr as Prefix

BOOL B is prefixed

bool* PB as Prefix

Byte by IS prefixed

Struct ST is prefixed

Enum em as Prefix

Union UN is prefixed

DWORD DW is prefixed

Word w is prefixed

Vector VEC as Prefix

List LST is prefixed

  

Class member variable m_ is prefixed

Global variable g_ as prefix

Static variable S_ as prefix

  

  

  

  

Personal C + + coding specification

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.