how to merge c++11 c++14 with c++17? — HELP

Revision en2, by Saiyan_1991, 2020-04-17 11:52:46

I use minGW c++17 compiler in codeblocks. Recently I wanted to code in sublime text 3 and CP editor and there I'm continuously getting error message like "range-based 'for' loops only available with -std=c++11 or -std=gnu++11" , "'clamp' was not declared in this scope", "'nullptr' was not declared in this scope" etc. But in codeblocks those codes are fine and running smoothly. Even OJs are not giving compilation error.

Especially this blog's code snippets are are not working in my codeblocks compiler too!! But they are working fine in Codeforces custom invocation.

I have installed latest version of minGW compiler but still this problem is occurring. I tried to change (settings > compiler > toolchain executables) the path of the codeblocks inbuilt compiler with recent downloaded compiler but it is not compiling then.

so how can I,

  1. Change compiler in codeblocks.

  2. Merge c++11 and c++14 with c++17 like codeblocks so that i don't get above mentioned errors while I'm compiling in CP editor or sublime text.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Saiyan_1991 2020-04-17 11:52:46 12
en1 English Saiyan_1991 2020-04-17 11:26:58 1118 Initial revision (published)