#Help with either fixing Visual Studio, or help with setting up VS Code for C++

8 messages · Page 1 of 1 (latest)

white jetty
#

Hello, I am trying to get started with the C++ track. I am on the last will exercise, and I am doing each task, and running the code one by one in Visual Studio. What happens is that it says that I pass every test (Yay!), but the truth is that it's passing every test when I haven't done every task (Nay!). This is shown in the first two images.

I couldn't figure out how to fix it, so I tried to set up C++ in visual studio code. However, I ran into many issues with this approach, and I kept getting errors when I tried to compile with MinGW, shown by the third image. I would really prefer to work on my laptop, if anybody can help me figure out what is going on with either of the two programs, I would highly appreciate it.

I would prefer to use VSCode, as I simply prefer the layout of VSCode, but getting either fixed would be greatly helpful. Thank you.

cinder cobalt
#

I do not recommend using Visual Studio Code with MingGW for programming C++ on Windows. It's hard to set up, and I've seen so many complaints. But if you really want, it's possible. You just will be on your own because AFAIK not many will be able to help you here. Perhaps this recent thread contains something helpful: https://discord.com/channels/854117591135027261/1367969926542921831

In my experience setting up Visual Studio (not Visual Studio Code) is easy. Download Visual Studio from Microsoft, install it, then install C++ CMake tools for Windows (see our documentation about Installing C++ locally). Then you should be able to download an exercise from Exercism with the exercism CLI, open the folder in Visual Studio, and start programming.

What happens is that it says that I pass every test (Yay!), but the truth is that it's passing every test when I haven't done every task (Nay!).
Did you enable the tests, as explained here? Initially only the first test (or for "Last Will" the first two tests) are enabled, all other tests are disabled with the EXERCISM_RUN_ALL_TESTS line. The idea is that you just do enough coding that the current test succeeds, refactor the code to keep it clean, and then proceed to the next test by moving the #if defined(EXERCISM_RUN_ALL_TESTS) line one test further.

white jetty
#

okay, i tried just moving it to the end to see if it works, but it doesnt

#

if i click yes it passes them either way

cinder cobalt
#

Take a closer look at the error messages:
assemble_code: identifier not found.
Without seeing your solution I can only guess the problem is in there.

#

Also, please post code snippets and error messages as fenced code blocks. Screenshots cannot be read by everybody and they cannot be copied as text.

cinder cobalt
#

If you're still having problems fixing the issue, please post your solution and the error message (as code blocks).