while(*str){ statements str++;}
char * pstr = new char[n + 1];pstr = '\0';while(n-- > 0) pstr[n] = c
C和C++中并没有提供Pi的数学常量表示,但是我们可以使用数学库的三角函数来表示。#include <math.h> #define PI (4 * atan(1))
C和C++中并没有提供Pi的数学常量表示,但是我们可以使用数学库的三角函数来表示。
#include <math.h> #define PI (4 * atan(1))