#include <iostream>
#include "namespaces.h"
#include<string.h>
using namespace std;
using namespace mycode;
int main() {
int a(5);
int b{ 8 };
int c{ 9 }, d(6), e{}, f = 9;
cout << a << endl;
cout << b << endl;
cout << c << endl;
cout << d << endl;
cout << e << endl;
cout << f << endl;
int h=3.7;
cout << h << endl;
auto i = true;
auto j = false;
cout << typeid(i).name() << endl;
decltype(7) k;
cout << typeid(k).name() << endl;
}
C++11 变量初始化,auto, typeid, decltype使用示例
于 2023-11-21 13:36:23 首次发布