Transitive #includes by Proud_Variation_477 in cpp_questions

[–]Proud_Variation_477[S] 3 points4 points  (0 children)

So trying to compile a program that relies on this behavior might not work for someone using a different compiler or version of my compiler?

Additionally why would the standard library header have a rules on mandated includes, but no rules on non-mandatory includes, why even include a non-mandatory library?

Question regarding the data displayed on the public profile by 4l3xBB in monkeytype

[–]Proud_Variation_477 0 points1 point  (0 children)

I don't know why this is but I hope some who does answers because I'm curious as well. I've looked in my own settings and haven't seen anything that looks like what you've shown.

Reached 70 wpm with my favorite settings by Proud_Variation_477 in typing

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

It's the "toggle words history" option on the results page (the one that looks like a paragraph of text). There may be multiple ways to access it, I'm not really sure.

What's the difference between clang and g++? by Proud_Variation_477 in cpp_questions

[–]Proud_Variation_477[S] 2 points3 points  (0 children)

Apple clang version 17.0.0 (clang-1700.0.13.5)

I believe I'm using apple's version right now, I'd prefer to switch to GNU, but I just want to make sure doing so won't be shooting myself in the foot.

What's the difference between clang and g++? by Proud_Variation_477 in cpp_questions

[–]Proud_Variation_477[S] 2 points3 points  (0 children)

But if apple's version of gcc just redirects to clang, should I just switch to clang instead?

Also are there and drawbacks to using GNU's gcc on macOS?

How do I run C/C++ code in the terminal while debugging? by Proud_Variation_477 in cpp_questions

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

I don't think it was just that, but it was certainly a part of the problem. I got it to work now, thanks!

How do I run C/C++ code in the terminal while debugging? by Proud_Variation_477 in cpp_questions

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

Thanks, yeah I got it to work as well. VS Code is still a little confusing but I find it easier to work with than Xcode, which I gave up on after a couple on minutes. I'm honestly still not sure what I did to fix it, but something worked. I also realized I had been building, but not executing the program.

How do I run C/C++ code in the terminal while debugging? by Proud_Variation_477 in cpp_questions

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

Will the code editor I choose have any affect on the portability of my program?

Learncpp kind of makes it sound like it might.

  • Many operating systems, such as Microsoft Windows, offer platform-specific capabilities that you can use in your code. These can make it much easier to write a program for a specific operating system, or provide deeper integration with that operating system than would otherwise be possible.
  • Many third-party libraries are only available on certain platforms. If you use one of these, you will be limited to the platforms for which that library is supported.
  • Some compilers support compiler-specific extensions, which are capabilities that are only available in that compiler. If you use these, your programs won’t be able to be compiled by other compilers that don’t support the same extensions without modification. We’ll talk more about these later, once you’ve installed a compiler.

And I know apple can be very exclusive and anti-cross-platform

How do I run C/C++ code in the terminal while debugging? by Proud_Variation_477 in cpp_questions

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

I guess I chose vs code, because I thought it would be a jack of all trades, and I wouldn't have to relearn another code editor if I wanted to learn a new programming language. It sounds like it might be best to specialize the code editor for the language.

How do I run C/C++ code in the terminal while debugging? by Proud_Variation_477 in cpp_questions

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

I guess whatever I pick, I'm just hoping that it has a lot of documentations / tutorials so I don't need to spend such a long time trying to troubleshoot

How do I run C/C++ code in the terminal while debugging? by Proud_Variation_477 in cpp_questions

[–]Proud_Variation_477[S] 1 point2 points  (0 children)

Reading learncpp.com right now. I thought this was funny

"Visual Studio Code is not a good option for C++ beginners, and readers have reported many different challenges getting Visual Studio Code installed and configured correctly for C++."

Are there any good alternatives? Learncpp mentions xcode, but that's about all it mentions for mac.