【水】关于洛谷IDE的版本号
  • 板块灌水区
  • 楼主__uint256_t
  • 当前回复7
  • 已保存回复7
  • 发布时间2020/11/22 23:31
  • 上次更新2023/11/5 07:29:29
查看原帖
【水】关于洛谷IDE的版本号
377164
__uint256_t楼主2020/11/22 23:31

RT

#include <iostream>
#include <sstream>

using namespace std;

std::string ver_string(int a, int b, int c) {
  std::ostringstream ss;
  ss << a << '.' << b << '.' << c;
  return ss.str();
}
int main() {
      std::string true_cxx =
#ifdef __clang__
   "clang++";
#else
   "g++";
#endif

  std::string true_cxx_ver =
#ifdef __clang__
    ver_string(__clang_major__, __clang_minor__, __clang_patchlevel__);
#else
    ver_string(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
#endif

    cout << true_cxx_ver << endl;
    
    return 0;
}

把此代码复制到IDE中,运行后输出8.3.08.3.0

2020/11/22 23:31
加载中...