I got warning error when compiling C++ code in Macos Ventura

Revision en4, by ReTai-Hieu, 2023-08-07 16:50:11

my code

#include<bits/stdc++.h>
#define ii pair <int,int>
#define fi first
#define se second
#define int long long
#define double long double
#define endl '\n'
#define all(x) x.begin(), x.end()
using namespace std;

signed main(){
    //freopen("input.INP", "r", stdin);
    //freopen("output.OUT", "w", stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    cout << 100 << endl;
    return 0;
}

I use g++11 and vscode

That warning doesn't affect me if I run the code normally, but since I use CPH to compile it will stop my program and not run the test cases.

How to fix it

I dont know why, but the problem is I use Command Line Tools for Xcode 15. I have tried to install Command Line Tools for Xcode 14.3.1 then it works fine now

Tags macos

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en4 English ReTai-Hieu 2023-08-07 16:50:11 181 Tiny change: 'ght=990)\n' -> 'ght=990)\n\n**How to fix it**\n'
en3 English ReTai-Hieu 2023-08-07 16:40:28 4
en2 English ReTai-Hieu 2023-08-07 16:34:49 296
en1 English ReTai-Hieu 2023-08-07 16:27:57 697 Initial revision (published)