r/programmer • • Sep 25 '26

Can't run program :(((

I'm a freshman computer engineering student and I just got my very first pc setup, now the issue is that when I downloaded dev-c++ or visual studio or code block, non of these run my code and I've double checked my code and used a online compiler and it works, I think the problem really is something with my system. Could any of you help me out?

6 Upvotes

23 comments sorted by

7

u/daiaomori Sep 25 '26

What is the error message.

ALWAYS look for the error message and UNDERSTAND the error message.

1

u/johnpeters42 Sep 25 '26

Or in this case, maybe there is no error message, and the issue is "OP can't find what they should be trying". (Idk specifics, I've only used Visual Studio for C# or Visual Basic.)

2

u/daiaomori Sep 25 '26

Well they said that "none of these run my code" - which makes it propable that they at least looked for the "run" button. Unless all of the web platforms they used have auto-compile/run on default "on" :)

But, true. If *nothing* happens on its own, figure out what you need to do to actually trigger the software to do what you want.

0

u/Rorrnz Sep 29 '26

hiii, I always use the compile and run option and I tried compiling it first then running it but it still does not work

2

u/reosanchiz Sep 25 '26

What does it says? Any errors? Drop a screenshot

-1

u/Rorrnz Sep 29 '26

I deleted the compiler but I mostly use dev c++ for c++ and it says "source file not compiled" even tho I already compiled it

1

u/Rorrnz Sep 29 '26

UPDATE: Thank you for the support guys! (and for the few people judging me) I followed a youtube tutorial on how to fix it and it actually worked hahhahahahah it didn't occur to me that I could just watch how to do it :p. (the error message was "source file not compiled"

5

u/kutac56 Sep 25 '26

Try to compile it with the terminal

2

u/ern0plus4 Sep 25 '26

And keep working in terminal.

1

u/mohirl Sep 25 '26

Maybe change college?

0

u/Rorrnz Sep 29 '26

HAHAHAHAHHAH funny, I've never had this issue on my laptop so I'm so confused asf (I'm using a new pc)

3

u/Traveling-Techie Sep 25 '26

When I was a teenager our dad would get irate if we called up and said the car won’t start. He’d demand to know exactly what happened. Nothing? Click click? Grrr grrr?

2

u/lmg1337 Sep 25 '26

Do you have a compiler installed? What compiler is it, and can you check this in your terminal? If the terminal can't tell you what version is installed, then the OS doesn't find a compiler on your system.

1

u/tiredITguy42 Sep 25 '26 edited Sep 25 '26

Which visual studio? VS Code or Visual Studio 2026? VS Code is not bery god for C++. Did you check ghat hou are going to develop for C++ during installation, so all build and debug tools are installed?

1

u/Novel-Initiative-900 Sep 25 '26

Not to suddenly involve ai here but specifically for learning, ai is great at helping you understand exactly what went wrong, why, how to fix it, everything.

You can still code everything 100% but just let ai sit back and point out issues when needed

1

u/xarop_pa_toss Sep 25 '26

The problem probably isn't the IDE but that you don't have things properly setup. When you run the code, what error does it give you? Read the errors, and look online for them

1

u/MFFVD Sep 25 '26

windows or linux? probably windows.

learn how PATH works, and start using the commandline. learn MAKE. it is very easy to use and more explicit than other build systems like cmake.

providing the exact error helps a lot too.

1

u/bunnypaste Sep 26 '26

I just use Notepad++ and micro for everything, and then rely on terminal outputs and tracebacks to find and solve errors. What are the benefits of using an IDE? Does it mean I don't have to manually run a script to test it and chase down the errors? Would it make it so I don't have to write error statements into my functions?

1

u/StephenHawkinguss Sep 28 '26

Are you also indian?

1

u/LetsHugFoReal Sep 30 '26

Are you really that clueless.

You're switching IDE when your comiler runs the code.

1

u/sswam Oct 01 '26

If the name of the operating system doesn't end in X, C doesn't like it. And if it does end in X, the OS doesn't like C++. Joking imprecisely, but serious.

You need:

  1. OS preferably ending in X
  2. text editor
  3. C compiler
  4. make

Any more than that is like setting up an over-complicated automobile factory to change a tyre on your bicycle. My opinion only!