#EXECUTION PROBLEM

253 messages · Page 1 of 1 (latest)

edgy tendon
#

HELP ME AT THE BEST PLS I JUST STARTED C++ ON VS CODE STUDIO...THIS EXEXCUTION PROBLEM IS COMING...WHENEVER I CLICK ON RUN FILE DEBUG FILE OR EVEN RUN CODE SOME ERRORS START APPEARING OR THE OUTPUT DOESNT SHOW UP

exotic stormBOT
#

When your question is answered use !solved or the button below to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

wild sonnet
#

do you expect us to hack into your pc to see the error?

gritty bridge
#

Also what do the errors say

#

Ussualy they say whats wrong with YOUR code

wild sonnet
#

you cant just press "run" and expect it to work

#

you must tell it how to run

#

iirc vscode needs you to make a launch.json file somewhere which tells it what to do

edgy tendon
velvet parrot
#

In case you don't know, writing in ALL-CAPS generally gives the impression of shouting which is impolite.

wicked mural
#

looking at the way you are handling this

i would urge you to download visual studio instead vs

gritty bridge
#

Im sorry

#

Anyway that is an interesting error

edgy tendon
wild sonnet
edgy tendon
#

Yes

wild sonnet
wild sonnet
#

probably better if you do tho

wild sonnet
edgy tendon
wild sonnet
#

no... just once

edgy tendon
#

This is the fate right🥹

wicked mural
wild sonnet
#

do you have a .vscode folder in your project?

wicked mural
#

also it is objectively easier to use vs for a beginner

wild sonnet
wild sonnet
#

m

#

ore by the time it isntalls

gritty bridge
wild sonnet
#

kitty walked on keyboard

#

pressed enter a bunch

gritty bridge
#

For example sublime text's nice

edgy tendon
exotic stormBOT
# exotic storm

Thank you and let us know if you have any more questions!

This thread is now set to auto-hide after an hour of inactivity

gritty bridge
#

Uh

wicked mural
# edgy tendon Whats the difference?

vscode is an editor, it is general purpose , to code with any language , you will have to install extension , do configuration and stuff
vs is an IDE , it is made for writing C++ / C# code , which means , it already comes with a lot of stuff preconfigured and preinstalled for those specific languages , so it works out of the box

wicked mural
exotic stormBOT
# exotic storm

Thank you and let us know if you have any more questions!

This thread is now set to auto-hide after an hour of inactivity

wild sonnet
#

it doesnt matter whcih glorified notepad you use at the end of the day its just preferencec it wont make your code run any different

edgy tendon
wild sonnet
#

the text in the file

wild sonnet
edgy tendon
wild sonnet
#

the text inside launch.json

edgy tendon
#

Bear this crap I cant anymore...I have been vs code for like 3 hrs now

wild sonnet
#

also send text not screenshots

exotic stormBOT
#
How to Format Code on Discord
Markup

```cpp
int main() {}
```

Result
int main() {}
edgy tendon
#

{
"version": "0.2.0",
"configurations": [
{
"name": "C/C++ Runner: Debug Session",
"type": "cppdbg",
"request": "launch",
"args": [],
"stopAtEntry": false,
"externalConsole": true,
"cwd": "e:/TEST",
"program": "e:/TEST/build/Debug/outDebug",
"MIMode": "gdb",
"miDebuggerPath": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}

gritty bridge
#

The text file

wild sonnet
#

no this is fine

gritty bridge
#

I mean yea but

#

Yk

wild sonnet
#

I am confused, where is the source file?

#

or the compiler command

edgy tendon
#

I just started a week ago

wild sonnet
#

yk what this is out of my depth Im a neovim dweller you help them bacon

#

it be a lot easier if you just used cmake tbh

edgy tendon
#

Is there any thing you want me to do?

edgy tendon
wild sonnet
#

ik it works well with vscode for a fact cause I used it a while ago

#

Going over a starter template to manage your C++ project with Visual Studio Code.

-- References --
https://code.visualstudio.com/
https://cmake.org/
https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild?view=vs-2022
▶ bird wallpaper in thumbnail: https://wallhaven.cc/w/nm3eg9

-- Code, Tech, and Tutorials Links --
▶ Patr...

▶ Play video
#

here is some random tutorial I found

#

idk if its any good its the first thing I found

gritty bridge
#

If i would say send the png i would reffer to an image because thats an image format

wild sonnet
edgy tendon
#

okay I guess idk how my teach will react

wild sonnet
#

what did your teacher tell you to use?

#

cause I will bet you it was probably not vscode

gritty bridge
#

Code::blocks trolol

edgy tendon
edgy tendon
#

this one

wild sonnet
#

oh god

#

you know what

gritty bridge
wild sonnet
#

maybe just do that

#

it sucks and is old and you will probably hate it but you can switch ONCE YOU ACTUALLY KNOW WHAT YOUR DOING

#

cause right now its more effort then its worth

#

and you will have yo figure out everything on your own instead of doing what the teacher says

gritty bridge
#

I reccomend sublime text if u dont wanna use vs

edgy tendon
#

most of my mates are using vs code I dont want to be left out

wild sonnet
#

just do what your teacher teells you do until you can understand how to set up somethin else entirely on your own

edgy tendon
#

wait isnt codeblock meant for c users?

wild sonnet
#

no

gritty bridge
#

Also some other thing but those are libraries and stuff

edgy tendon
wild sonnet
#

just use code blocks for now

#

if your frinds figure it out later you can switch to vs code later they will help you

#

if they cant then there you go you wont be left out

edgy tendon
#

How about I delete vs code and everything and then reinstall it?

wild sonnet
#

that wont help

gritty bridge
#

i wish Windows had package managers

edgy tendon
#

I wanna know why

wild sonnet
wild sonnet
edgy tendon
#

I will set up everything precisely

#

unlike the last time🙄

wild sonnet
gritty bridge
wild sonnet
gritty bridge
#

Never going back to windows

wild sonnet
gritty bridge
#

Anyways any more questions op

edgy tendon
gritty bridge
#

I like that we are on the same page

wild sonnet
#

development on linux also doesnt suck ass

#

it actually just works

#

and is intuitive

gritty bridge
edgy tendon
#

anyways its my 2nd time reaching out to people for this problem I guess it will persist forever

wild sonnet
#

just

#

do

#

what

#

your

#

teacher

#

tells

gritty bridge
#

And nice build

wild sonnet
#

you

#

please

wild sonnet
#

you will be able to switch to what you want later

#

when you know what your doing better

edgy tendon
#

teacher suck my ass I hate him

wild sonnet
#

whats the point of attending classes if your not gonna take the lessons they give you

edgy tendon
#

he is very restrictive

#

he doesnt help

gritty bridge
#

Also why arent you using neofetch is it because its old🐢 👴 🔨

#

"im old"

wild sonnet
#

if your vscode config wont work he wont be able to help you

#

he cant possibly learn everything

wild sonnet
#

and super slow

edgy tendon
#

Give me a one time solution

gritty bridge
wild sonnet
#

like a second or two to show basic info?

wild sonnet
edgy tendon
gritty bridge
wild sonnet
gritty bridge
wild sonnet
gritty bridge
wild sonnet
#

written in pure C 😎

wild sonnet
#

just do what the teacher tells you

gritty bridge
#

Do what you like just dont blame it on us

wild sonnet
#

if the teacher tells you to for example: switch to c++17 you wont know how to unless you use the exact thing he uses

edgy tendon
gritty bridge
#

I reccomend sublime

wild sonnet
#

once you understand how this works well enough to be able to follow his instructions without a direct guide then swithc

wild sonnet
gritty bridge
#

Hol up

wild sonnet
#

is it foss?

gritty bridge
#

free

wild sonnet
#

is it foss tho?

gritty bridge
wild sonnet
#

doestn look like it is

#

cringe

#

gotta use foss text editors

gritty bridge
#

vim?

wild sonnet
#

very simple config I made with just 145 lines of lua and it works grate

gritty bridge
#

neovim

wild sonnet
gritty bridge
#

cool i dohave vim installed althought thats only for cmd tomfoolery and other stuff

wild sonnet
#

neovim is the best >:3

#

it just takes some getting used to

#

like a month of getting used to

#

or 2 or 3 or more

gritty bridge
#

i mean i would use vim and othermore but m typingis iinda bad

edgy tendon
#

hey so I am using codeblocks does it have everything pre installed?

wild sonnet
#

so?

gritty bridge
#

i mean i can type fast but only with my eyes on the keyboard

edgy tendon
#

okay

gritty bridge
wild sonnet
edgy tendon
wild sonnet
#

I for one cant type fast when looking at the keyboard :P

gritty bridge
wild sonnet
edgy tendon
#

yup I am using stdio.h for now

wild sonnet
#

thats not C++

#

thats C

#

and the proper way to use C header in C++ is to use <cHEADER_NAME> with no .h

edgy tendon
#

I am also learning c

wild sonnet
#

so <cstdio>

edgy tendon
#

its like a subset of c++

wild sonnet
edgy tendon
#

isnt it?

gritty bridge
#

yes

wild sonnet
#

its not

gritty bridge
#

well if cpp is a super set of c why not the other way around?

wild sonnet
#

its the predicesor

wild sonnet
#

let me give you an example

gritty bridge
#

us*

#

me and lungfung

edgy tendon
#

what the hell is this?

wild sonnet
#

;compile

#include <stdio.h>
#include <stddef.h>

void print_pointer(void* pointer) {
printf("%zx\n", pointer);
}

int main() {
int my_int = 3;
print_pointer(&my_int);
}
uncut martenBOT
#
Program Output
7fffc19280fc
wild sonnet
#

this is C

uncut martenBOT
#
Program Output
7ffe680139dc
wild sonnet
#

uigh it compiled with C again

#

;compile

#include <stdio.h>
#include <stddef.h>

void print_pointer(void* pointer) {
printf("%zx\n", pointer);
}

int main() {
int my_int = 3;
print_pointer(&my_int);
}
uncut martenBOT
#
Program Output
7ffdec7d851c
wild sonnet
#

ugh

#

nevermind this

#

;compile

void main() {}
uncut martenBOT
#
Compilation successful
wild sonnet
#

compiler bot is eivl

gritty bridge
#

acualy empty file

#

and that

wild sonnet
#

I could have sworn that c++ doesnt allow implicit casts to void* from another pointer

gritty bridge
#

the hellare you even pointing to btw

#

to the abyss?

wild sonnet
#

to my_int

gritty bridge
#

mint

#

mhhhhh

wild sonnet
#

void main {} is (bearly) legal in C but not in C++

#

in C++ the main function is defined as these

#

in C its defined as these

#

including literally fucking anything

#

so thats why you can do void main in C but not C++

#

there is a lot of these differences

#

another example that actualyl matters

#

in C++ the members of an array have to be filled in the order they were declared

#

in C they dont

#

so no C is not a subset of C++ tho it is a common misconception

#

many C projects wont comile if you compile it as C++