添加c++11特性测试代码

master
zcy 2021-03-08 12:01:35 +08:00
parent c8488d3918
commit ff5ffcff63
5 changed files with 72 additions and 0 deletions

View File

@ -0,0 +1,23 @@
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.17763.0",
"compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "windows-msvc-x64",
"configurationProvider": "ms-vscode.cmake-tools",
"compileCommands": "${workspaceFolder}/build/compile_commands.json"
}
],
"version": 4
}

27
test/src/cpp11/.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,27 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "C++ Launch (GDB)",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/cpp11.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "为 gdb 启用整齐打印",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}

5
test/src/cpp11/.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,5 @@
{
"files.associations": {
"ostream": "cpp"
}
}

View File

@ -0,0 +1,7 @@
cmake_minimum_required(VERSION 3.15)
project(cpp11)
message("current dir" ${CMAKE_CURRENT_SOURCE_DIR})
add_executable(cpp11 cpp11_test.cpp )

View File

@ -0,0 +1,10 @@
#include<iostream>
using namespace std;
#include<stdio.h>
int main(){
int x;
cout<<"hello world"<<endl;
printf("shit");
getchar();
}