Anyone else have problems with Visual Studio?

Or am I just doing it wrong?

Last night I was working on homework for my C++ class and I spent an extra 45 minutes trying to figure out what was wrong with my code, because no matter what I did I just couldn’t get the errors to go away. I’ve seen them update automatically when I fixed them before, but they just wouldn’t do anything. Eventually I did a little test. I changed the cout to say something different, saved it, ran it, and it was still displaying the previous cout. So I changed it back to what I wanted it to be, saved it again, exited VS, opened it back up, ran it, and it worked perfectly fine. I basically just restarted the program and voila, no more errors and it runs perfectly fine even though I didn’t change a single thing. The problem is that I get similar symptoms all the time.

It’s extremely fucking frustrating, especially when I have my midterm tonight, which is timed so I don’t really have time to be screwing around with this kinda stuff, and I can’t trust it to work properly.

So far Xcode seems to work the best (as in the way that I’m using it is not causing any issues) with very minimal setup, but Xcode is only on Mac and I don’t like having to keep setting up my work computer and connecting all my peripherals and stuff to it just to do my homework, and then take it down and pack it up again for work. Is there something on Windows or Linux that’s as simple (no need to set up compiler, cuz I don’t have a whole lot of free time as it is so I don’t feel like screwing with it)?

I don’t really have time to screw around with new stuff today, so I’m just going to use Xcode, but I’d like to find something I can start using next week.

I’ve fiddled with Netbeans and Code Blocks a bit, but neither work out-of-the-box like Xcode or VS. Atom actually works really well on my Mac, but keeps throwing errors when I try to run files on Windows even though I have it set up the same.

I had my fair share of problems with Visual Studio, but they are pretty far and few between.

I recommend CLion (free for students) or Visual Studio code. They both require you to set up a compiler but it only takes a single terminal command under linux to do so.

If you want a full IDE that just works CLion is the way to go.

1 Like

Have you tried cleaning the solution

I use and can recommend Visual Studio Code, works on all major OS´s and comes with nothing out the box.
In the internal extension getter, search for c, then install the C/C++ Intellisense from Microsoft.

For coding on Linus: Install Clang
For coding on Windows: Install MinGW

MinGW setup

First time compile: Rightclick the file in the workspace overview on the top left, select open in command prompt and hit it with
Linux: clang yourProject.c
Windows: gcc yourProject.c
For c++ in linux: clang++ yourProject.cpp in windows: gcc youProject.cpp -lstdc++
After that, you can just arrow up in the command prompt.

To run it:
Linux: ./a.out
Windows: a.exe

Thank you all for the suggestions.

I actually tested out Dev-C++ for a little bit before starting my midterm and I like it a lot (did my midterm with it too). There’s just the normal Windows setup (click next a few times and finish). Very straightforward, no compiler setup afterwards. The built-in themes are nice. It’s not too complicated. I think I’ll keep using it for now. It’s not as pretty as Xcode, but that’s not a deciding factor.

I do realize the most immediate issue was resolved, but thought to add a few thoughts which may be relevant for a while.

Most likely because LLVM has surpassed being a strict subset of GCC (now it has features of its own which GCC does not), and is made specifically to expose errors better, and interact with IDE better than GCC has been able to. When you put LLVM code in GCC, it will often start crying and be unable to tell you exactly what you did to hurt it, because it simply isn’t as good at communicating errors.

The MingW distribution may not be the latest version of GCC available for Windows. MSYS2 is very much up to date, in spite of not showing it clearly (they haven’t updated their damn page to tell you they in fact have GCC 7.1 running on windows, those lazy bastards), and it directly supersedes MingW, and not Cygwin, in spite of the Cygwin mention. The difference to MSYS is MSYS used to be installed separate from MingW. Now you install GCC inside of MSYS2 instead. MSYS2 being essentially a linux-like distro, it can possibly be used to install LLVM on windows too, although I do not recall attempting to do so myself. MSYS2 did have a few kinks, though, when I installed it to do some Ada programming with the GPS IDE (due to the retarded Ada runtime licensing model by the Gnat people it costs a fuckload of money to compile 64-bit on Windows using their own Ada runtime, but nothing at all using the GCC Ada runtime, go figure). Idk if there are any similar kinks for installing / upgrading the C/C++ compilers using MSYS2? Once I got it running, it’s been good to me.

Anyway, for using GCC on Windows, MSYS2 is the most current way to go that I have been able to find.

Spot on, if you just need something, anything, that thing just works out of the box, after all these years.

Ya I was pleasantly surprised by how well it works. I’m not even going to mess with trying to learn another at the moment.

I have one more C++ class after this, so Dev will be good for a while, and then I move to Java. Then I’ll see what the teacher recommends and go from there.

Netbeans. That’s about what everyone uses for it.

I hate it, because it was made with Java, and while it eats its own dogfood, the program sucks for HiDPI displays. So if you have a 4k monitor the editor will look like shit. I’ve email a screenshot of this to my professor, and since it doesn’t really matter how you make your code they just expect it to be exported with netbeans I use it to bootstrap a project, and then do the rest via terminal and vscode.