diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index d9fa3c7..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - // 使用 IntelliSense 了解相关属性。 - // 悬停以查看现有属性的描述。 - // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "(gdb) 启动", - "type": "cppdbg", - "request": "launch", - "program": "输入程序名称,例如 ${workspaceFolder}/a.out", - "args": [], - "stopAtEntry": false, - "cwd": "${fileDirname}", - "environment": [], - "externalConsole": false, - "MIMode": "gdb", - "setupCommands": [ - { - "description": "为 gdb 启用整齐打印", - "text": "-enable-pretty-printing", - "ignoreFailures": true - }, - { - "description": "将反汇编风格设置为 Intel", - "text": "-gdb-set disassembly-flavor intel", - "ignoreFailures": true - } - ] - } - - ] -} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index 5d4653d..0000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "tasks": [ - { - "type": "cppbuild", - "label": "C/C++: gcc 生成活动文件", - "command": "/usr/bin/gcc", - "args": [ - "-fdiagnostics-color=always", - "-g", - "${file}", - "-o", - "${fileDirname}/${fileBasenameNoExtension}" - ], - "options": { - "cwd": "${fileDirname}" - }, - "problemMatcher": [ - "$gcc" - ], - "group": { - "kind": "build", - "isDefault": true - }, - "detail": "调试器生成的任务。" - } - ], - "version": "2.0.0" -} \ No newline at end of file diff --git a/test1 b/test1 new file mode 100755 index 0000000..70b20ea Binary files /dev/null and b/test1 differ diff --git a/test1.cpp b/test1.cpp index 0a708f9..0b14f89 100644 --- a/test1.cpp +++ b/test1.cpp @@ -28,6 +28,6 @@ int main() cout << i + 1 << endl; for (int j = 0; j <= i; j++) { - cout << books[j].no << "\t" << books[j].name << "\t" << setprecision(2) << books[j].price << endl; + cout << books[j].no << "\t" << books[j].name << "\t" << fixed << setprecision(2) << books[j].price << endl; } } \ No newline at end of file