#Spaceships, Compilers, and Errors
1 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
@pseudo meteor
Your message appears to contain screenshots but no code. Please send code and error messages in text instead of screenshots if applicable!
that's not what the spaceship operator is for
I'm only trying to test that I have c++20 working, not anything in particular. I'll send the code though:
#include <iostream>
int main() {
auto result = (10 <=> 20) > 0; //test if C++ 20 is supported
std::cout << "result: " << result << std::endl;
return 0; }
This works in other places^
wait nvm spaceship is a real operator with uses other than overloading
oh
you need to pass -std=c++20 to the compiler
compilers still default to C++14
ah okay one sec
Not sure
wait they're out of order
g++ -std=c++20 -o executable_name cpp_name.cpp worked
Thank you! I was a little confused-
!close