zoukankan      html  css  js  c++  java
  • 初始化的例子

    // initialtest.cpp : 定义控制台应用程序的入口点。
    //

    #include "stdafx.h"
    #include <iostream>

    using namespace std;

    class iniT
    {
    public:
        int ia;
        //iniT()
        //{
        //    cout<<"i am iniT"<<endl;
        //}
    };

    int outmain;

    iniT test;

    class other
    {
    public:
        iniT otheriniT;
    };

    other othertest;

    int _tmain(int argc, _TCHAR* argv[])
    {
        cout<<"i am iniT's ia "<<test.ia<<endl;
        cout<<"i am outmain "<<outmain<<endl;

        int innermain;
        cout<<"i am innermain "<<innermain<<endl;

        iniT innerT;
        cout<<"i am innerT's ia "<<innerT.ia<<endl;

        cout<<"i am othertest "<<othertest.otheriniT.ia<<endl;

        other innerother;

        cout<<"i am innerother "<<innerother.otheriniT.ia<<endl;
        
        getchar();
        return 0;
    }
  • 相关阅读:
    youtube-VisualSfM and MeshLab workflow video-meshlab part integration
    testing_lab1
    homework2-st
    homework1-spm
    homework1-st
    just one last blog
    week 10
    week 9
    week 8
    课后题7
  • 原文地址:https://www.cnblogs.com/bayonetxxx/p/1731610.html
Copyright © 2011-2022 走看看