#Terminal Spam with C++ compilation (I'm new to C++)

1 messages · Page 1 of 1 (latest)

young mist
#

My code:

// includes and stuff.

int main() {
    const double pi = 3.14;
    const double sqrtpi = sqrt(pi);
    cout << sqrtpi << " " << max(pi, sqrtpi);
}

sometimes it would turn into this: (debug logs)

Breakpoint 1, main () at /home/flameyosflow/HelloWorld/main.cpp:8
8    int main() {
Loaded '/lib/x86_64-linux-gnu/libstdc++.so.6'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libc.so.6'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libm.so.6'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libgcc_s.so.1'. Symbols loaded.
[Inferior 1 (process 6099) exited normally]
The program '/home/flameyosflow/HelloWorld/main' has exited with code 0 (0x00000000).

and when I delete the binary and stuff like that, everything executes normally with additional debug:

1.772 3.14[1] + Done                       "/usr/bin/gdb" --interpreter=mi --tty=${DbgTerm} 0<"/tmp/Microsoft-MIEngine-In-vz2s5g0f.giu" 1>"/tmp/Microsoft-MIEngine-Out-rfxnlww4.kyq"

Expected output: 1.772 3.14 only.

How can I remove all this debug info? I'm using G++ and VSCode (too poor for C++ ides by jetbrains)

And yes I'm not directly running "Debug", just "Run"

polar atlasBOT
#

<@&987246683568103514> please have a look, thanks.

polar atlasBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

desert pivot
young mist
young mist
young mist
#

Now I will assume that gdb is causing it to add the debugging logs and I do not know how to not use it. I either set it up blindly or it just enabled by default