I'm looking for someone who uses the IDE codeblocks to try and run the program I made for class and see why it's not working. I didn't think it's anything major as it runs for me in visual studio 2019 but my teacher who is grading it is only using codeblocks and unfortunately I cannot manage to install it.
An IDE is just a text editor combined with a compiler combined with a linker all together in one easy, noob-friendly, package. There is nothing inherently different about Code::Blocks that would make it not work. I tested your code on cpp.sh and it is working fine fore me.
You should have no problems if it is run on Code::Blocks, provided the compiler is up to date and supports whatever standard of C++ you are using.
Hmm that is true I suppose but there are differences for some I thought. For example my version of visual studio doesn't need #include "stdafx.h"
Whatever the minor differences are they seem to be preventing my professor from running it on his computer and it does run on mine so I am just lost I guess.
stdafx.h is a precompiled header that some version Visual Studio uses. Other than that, everything is working fine. If the code doesn't work for him, its his own fault because it is valid C++ code. He shouldn't be getting any compilation errors.
Which tells me nothing. He did say before that I was missing some couts but I highlighted where the possible cout was missing and sent him the screenshot so he could just add that if that was the problem. It did not actually seem to be a problem though as it was running for me on visual studio like I said.
Things might be different now, but last time I checked, the compiler that comes with Code Blocks is somewhat outdated. It might not even compile with C++11 by default.
Your teacher gave you that screenshot as the error message? The heck? In a sane world, your teacher would give you the actual compiler error, and not a useless pop-up message. Ask for the actual compiler message!
In other words, what I'm saying is to get rid of C++11 features.
Try to compile your program using cpp.sh and select "C++98" as the compiler standard.
The most glaring thing is the use of raw strings, which is a feature new to C++11. But I'm not your teacher, so this is just me guessing as to what the problem could be.
Ooo thanks for the tip, yeah I had other people confirm it to be working on codeblocks and using other compilers. I don't know what I'm gonna do, I asked him now if he can send me the compiler errors at least.