#include using namespace std; /* run this program using the console pauser or add your own getch, system("pause") or input loop */ struct Circle { int radius; double girth; double area; }*cir1, *cir2 = new struct Circle; int main(int argc, char** argv) { //1.宣告結構指標變數struct pointer,方法1: cir1 = new struct Circle; //指標結構變數宣告時,有個規矩:都必須要特別配置一塊記憶體位置給指標變數 //例如:一般指標變數: int * a1 = new int; //例如:結構指標變數:struct Circle * a1 = new struct Circle; // new sturct Circle: (new)表示是配置一塊記憶體位置,其型別是(Circle的結構類) cir1->radius = 2; cout<<"cir1的半徑 = "<radius<radius = 3; cout<<"cir2的半徑 = "<radius<radius = 4; cout<<"cir3的半徑 = "<radius<