13.typedef

#include<iostream>
using namespace std;
int main()
{
    typedef char *pstring;
    typedef double that;
    char a = 'a';
    that i = 2.3;
    pstring b = &a;

    cout << i << endl;
    cout << *b << endl;
    system("pause");
    return 0;
}

 

 

 

#include<iostream>
using namespace std;
int main()
{
    typedef char *pstring;
    typedef double that;
    char a = 'a';
    that i = 2.3;
    pstring b = &a;
    cout << i << endl;
    cout << *b << endl;

    const pstring *c = &b;
    cout << **c << endl;
    system("pause");
    return 0;
}

 

posted @ 2019-03-07 20:08  虚设经年  阅读(125)  评论(0)    收藏  举报