////////////////////////////////////////// // // FileName: ***.cpp // Creator: piaocoder // Date: ****-**-** // Comment: *** // //////////////////////////////////////////
HANDLE CSOpenFile(const char cszFileName[], int nMode);或者:
BOOL CSReadFile(HANDLE hFile, void *pvBuffer, int nReadSize, int *pnReadSize );
if (n == -2) n = 1; else n = 2;不得写做:
if (n == -2) n = 1; else n = 2;
BOOL KSSaveToFile(const char cszFileName[],BOOL bCanReplace /* = TRUE */);或者:
BOOL KSSaveToFile(const char cszFileName[],BOOL bCanReplace );// = TRUE
for (i = 0; i < cbLine; i++) { // ..... printf("Line %d:", i); printf("%s\n", pFileLines); }不得写做:
for (i = 0; i < cb; i++) {printf("Line %d:", i); printf("%s\n", pFileLines);}
if (i > 0) { m = 1; n++; }不得写做:
if (i > 0){ m = 1; n++; }例外:
if (i == 0) { ASSERT(FALSE); return; }
if (n == -2) n = 1; else n = 2;或者:
if (n == -2) { n = 1; } else if (n != nTemp) { n = 2; } else { n = 3; }不得写做:
if (n == -2) n = 1; else if (n != nTemp) n = 2; else n = 3;不推荐:
if (i < 1) { n = 1; } else { if (i == 1) { n = 2; } else { if (i > 1) { n = 3; } } }
int n = 0, nTemp; for (int i = nMinLine; i <= nMaxLine; i++) (condition) ? funct1() : func2(); Or (condition) ? long statement : another long statement;不得写做:
int n=0, nTemp; for ( int i=nMinLine; i<=nMaxLine; i++ )
if (-2 == n)不得写做:
if(-2 == n)或
if ( -2 == n )
printf("%d\n", nIndex);
printf ("%d\n", nIndex);
printf( "%d\n", nIndex );
(KSFile*)pFile;也可写做:
(KSFile *)pFile不得写做:
( KSFile* )pFile ( KSFile * ) pFile
int Power(int x) { return (x * x); }2. if、else、for、while、do 等之后的代码。
switch (nID) { case ID_PLAY: ...... break; case ID_STOP: ...... break; default: ...... break; }
原文:http://blog.csdn.net/piaocoder/article/details/45772087