refPoint 别名与指针

// refPoint.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

int main(int argc, char* argv[])
{
    int i=2,j=3;
    int *p=&i;
    int &r=*p;
    printf("%d
",r);
    p=&j;
    printf("%d
",r);
    return 0;
}
/*
2
2
Press any key to continue
*/
原文地址:https://www.cnblogs.com/sky20080101/p/6795822.html