Giving error in gcd function
Prashant0664 opened this issue · 2 comments
Prashant0664 commented
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.
![image](https://private-user-images.githubusercontent.com/98750053/306330470-281f587d-2a67-4117-8069-3fac9200cce4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTUwMTMwNzQsIm5iZiI6MTcxNTAxMjc3NCwicGF0aCI6Ii85ODc1MDA1My8zMDYzMzA0NzAtMjgxZjU4N2QtMmE2Ny00MTE3LTgwNjktM2ZhYzkyMDBjY2U0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA1MDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNTA2VDE2MjYxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWViYzdmMjdkZWQzNDYzYzUyMDFmNjBjMTBmNmMwNjhjM2UzYWJjNThkMDkyMjQ3ZDE1MDExYjM2YTBjZDlhNDMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.IBwAyxysrgQj0bu-Gocg0M-OjrHKNCWl6zHKCoV55cg)
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
imeanup commented
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.
Prashant0664 commented
Thanks @imeanup , it worked perfectly. Closing this issue.