FastOlympicCoding icon indicating copy to clipboard operation
FastOlympicCoding copied to clipboard

use -std=c++17 and #include<bits/stdc++.h>

Open CarpeDiemly opened this issue 3 years ago • 2 comments

my OS: Windows, and I modified the setting file of FastOlympicCoding, like this: ` { "name": "C++", "extensions": ["cpp"], "compile_cmd": "g++ "{source_file}" -std=c++17 -o "{file_name}"", "run_cmd": ""{source_file_dir}\{file_name}.exe" {args} -debug",

"lint_compile_cmd": "g++ -std=c++17 \"{source_file}\" -I \"{source_file_dir}\""

}, Mainly to modify the compiler to C++17, but if I use#include<bits/stdc++.h>` in Cpp file, there will be errors when I build.

  1. use -std=c++17 and #include<bits/stdc++.h> with FastOlympicCoding---errors,
  2. use -std=c++14 or 11 and #include<bits/stdc++.h> with FastOlympicCoding---No error,
  3. use -std=c++17 and #include<iostream> with FastOlympicCoding---No error,
  4. use -std=c++17 and #include<bits/stdc++.h> without FastOlympicCoding---No error.

please help me, thanks!

CarpeDiemly avatar Apr 27 '22 14:04 CarpeDiemly

It seemed to be a problem with my compiler, when I installed mingw64, the problem was solved.

lihaoze123 avatar May 15 '22 03:05 lihaoze123

It seemed to be a problem with my compiler, when I installed mingw64, the problem was solved.

我安装的也是mingw64,从官网上刚下的最新版,但是就是有问题...orz

CarpeDiemly avatar May 31 '22 08:05 CarpeDiemly