Giving error in gcd function
I downloaded the extension just now, on running testcase, it is showing the error that gcd is undeclared. I tried using __gcd(), std::__gcd(), std::gcd(), gcd() but same problem is occurring, but code is running fine in Local Terminal.
Am i missing something in setup?
Extension Version: 6.1.0
VS Code Version: 1.86.2
Browser Version: Not using in browser, using in vs-code
Operating System: Apple Sonoma 64 Arch
check the clang --version in terminal. If the below is true, then you may try my settings which resolved the issue:
Apple clang version 15.0.0 (clang-1500.1.0.2.5)
Follow the below steps:
- Go to settings in VSCode.
- Type in the search
@ext:DivyanshuAgrawal.competitive-programming-helper - Under cpp: Args
-std=c++17 -stdlib=libc++ - Under cpp:command:
clang++ - cpp:submission complier:
GNU G++20 11.2.0 (64 bit, winlibs)
It will work as expected and note that __gcd() still doesn't work. But gcd() is working as expected.
Thanks @imeanup , it worked perfectly. Closing this issue.