@jadolby7,
Are you rquired to use CLion for running programs? It looks to me like there's something wrong with your C compiler.
What OS do you have? From your output I'm guessing you mave macOS.
If so, try opening Terminal (if you aren't already using it) and use clang to compile your program.
Use this command:
c++ -std=c++2a -g -o exec program.cpp |
c++: The clang C++ compiler in Terminal.
-std=c++2a: Flag that tells clang to compile as C++20 (the most recent version). Depending on what version of clang you have, you may be able to use
-std=c++2b instead.
-g: Flag that tells clang to create a special file for debugging (you can remove this if you don't plan to debug).
-o exec: -o is a flag, exec is whatever you want to call your executable. You can remove this and it will default to call your executable "a.out".
program.cpp: The name of your program. If you're using a Mac, it might be .cc instead of .cpp.
To run your executable, enter
where exec is the name of your executable.
Good luck,
max