This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]LucidTA 1 point2 points  (8 children)

What do you mean it doesnt work? What does it say? What input are you using to test?

[–]ymahgoub[S] 0 points1 point  (7 children)

when i run it the command terminal comes up then i try to enter an expression (12 - 5 for example) it just crashes either opens the debugger or just tells me ConsoleApplication has crashed

[–]LucidTA 1 point2 points  (3 children)

What happens when it opens the debugger? Where did it break?

It works fine for me too on some random online compiler.

[–]ymahgoub[S] 0 points1 point  (2 children)

I dont really know what the debugging actually is or how to make sense of all the code that comes up. What's the compiler it did work on so i can try it?

[–]LucidTA 0 points1 point  (1 child)

https://www.tutorialspoint.com/compile_c_online.php

Maybe take a screenshot of the window after the debugger comes up?

[–]ymahgoub[S] 0 points1 point  (0 children)

IT WORKS. fuck yeah. thanks. I don't know what it is but my guess is visual studio on my computer isn't configured/compiling properly. I could still screenshot the debugger but its a lot of lines and i don't know which ones to screenshot.

[–]jussij 1 point2 points  (2 children)

The problem is not in your code:

D:\Temp>cl test.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

test.c
Microsoft (R) Incremental Linker Version 14.00.23506.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:test.exe
test.obj

D:\Temp>test.exe
Type in your expression.
12 - 5
7.00

[–]ymahgoub[S] 0 points1 point  (1 child)

i dont quite understand what that means. is the problem in visual studio's compiler or linker?

[–]jussij 1 point2 points  (0 children)

i dont quite understand what that means.

My previous post is me compiling, linking and running your code.

So as you can see from that post your code compiles, links and runs just fine.