代码: #include <iostream> using namespace std; class A{ public: int a; }; int main(){ A *a1 = new A; A *a2 = new A(); cout<<a1->a<<endl; cout<<a2->a<<endl; A a3; cout<<a3.a<<endl; ; } 输出: 0 0 4196736 分析: 可以参考h
使用vue-cli构建项目后,我们会在Router文件夹下面的index.js里面引入相关的路由组件,如: import Hello from '@/components/Hello' import Boy from '@/components/Boy' import Girl from '@/components/Girl' 普通加载的缺点: webpack在打包的时候会把整个路由打包成一个js文件,如果页面一多,会导致这个文件非常大,加载缓慢 1.require.ensure()实现按需加载