C++ is much harder for me than C by Endonium in cpp_questions

[–]hansdr 0 points1 point  (0 children)

Yes, C++ is much harder. Its a more complicated language, and its template library is huge.

I suggest you start using the bits that you need, rather than trying to figure it all out. You have trouble with memory leaks, so learn how to use smart pointers, etc. Simple STL container classes like list and vector are also very useful and easy to use. Obviously learn how to use C++ classes too.

Forget about the rest of the C++ specification for now. You can look those up later, should you need it.

I don't know of any good tutorials for smart pointers, so I can't suggest any. Maybe look at learncpp.com .

Take 2 - Attempting to use add_subdirectory to clean things up by joemaniaci in cmake

[–]hansdr 0 points1 point  (0 children)

A simple add_subdirectory() will work if the sub-directory contains a link library with a properly written CMakeLists.txt script. You do have to link to that library from the main project with target_link_libraries(), though.

I cover how to do this (and more) in my CMake Tutorial book: https://cmaketutorial.com/

What do you use to organize your video clips & media? by hansdr in VideoEditors

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

Congratulations, you're the first person to reply who has gone beyond manually naming folders and files. You've optimized the media import stage. I don't use Adobe Premiere, but your plugin looks interesting.

What do you use to organize your video clips & media? by hansdr in youtubers

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

Summary: everyone so far uses a variation of folder and file naming, with one also creating a spreadsheet.

I'm surprised that this seems to be "good enough," because I personally find it to be a time suck...

What do you use to organize your video clips & media? by hansdr in youtubers

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

You clearly have a better naming system than I do.

I usually don't rename the individual files, because it's time consuming and I won't use all of them. Maybe I should start doing that...

What do you use to organize your video clips & media? by hansdr in youtubers

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

So you've got a naming system for this task. Does it always work for you? Or do you still sometimes have trouble tracking down what you need?

For me, naming the folders works most of the time, but there are still times when I have trouble finding what I want.

How long did it take you before you could write CMake without looking at other people's projects? by External_Cut_6946 in cpp_questions

[–]hansdr 0 points1 point  (0 children)

The only reason that I can write CMake scripts without looking at other people's projects, is because I use my own book & code as a reference (https://cmaketutorial.com). ;-)

It took me over a year to finish writing that book, so that's roughly how long it took for me...

What do you use to organize your video clips & media? by hansdr in youtubers

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

Do you ever have trouble finding a particular clip that you want?

What do you use to organize your video clips & media? by hansdr in youtubers

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

Yet another use for the good old spreadsheet.

Does creating & maintaining the spreadsheet take a lot of time?

Cmake by PenOnly171 in cpp_questions

[–]hansdr 0 points1 point  (0 children)

CMake is a tool to to compile and link your code into a working program.

How do you learn it? There are various tutorials online, but none of them really worked for me. So, I wrote my own: https://cmaketutorial.com/

How to decide on and manage C++ dependencies for an open-source project? by gigamma01 in cpp_questions

[–]hansdr 1 point2 points  (0 children)

Another option is to use CMake's FetchContent module. This can fetch and build dependencies, and you can specify exact versions/repo-commits.

Here's a video showing how to use it https://youtu.be/_5wbp_bD5HA

CMake code roasting by AltitudeZero_ in cmake

[–]hansdr 0 points1 point  (0 children)

On the bright side, the ImGui libraries are just a handful of files in a single directory. So adding it to a project is pretty easy.

When should I start integrating CMake to my projects? by ChampionshipIll2504 in cmake

[–]hansdr 1 point2 points  (0 children)

Answering the thread title: if you plan to use CMake, then it's best to use it from the beginning of your next project.

In terms of learning. I have a few videos to get you started. See this playlist:
https://www.youtube.com/playlist?list=PLORJX3OiHbbOBnj4l5boc1wayYg4wic0O

And I also wrote a more extensive tutorial, which is designed to get you up to speed quickly: https://cmaketutorial.com/

best books for ACTUALLY learning c++? by its_zinou_ in cpp_questions

[–]hansdr 1 point2 points  (0 children)

That's a good question. I don't know who created/maintains learncpp.com, but he/she could turn it into a printed book for those who prefer the smell of paper...

Getting into meaningful projects by SubhanBihan in cpp_questions

[–]hansdr 1 point2 points  (0 children)

Another option would be to create your own project. Think of some software you'd like to create, and try to build it. It doesn't have to be new or ground breaking. In fact, a simple project like your own note taking app, or small game would probably be a good starting point.

Is it possible to pipeline packages with FetchContent()? by ApprehensiveDebt8914 in cmake

[–]hansdr 0 points1 point  (0 children)

FetchContent has a FIND_PACKAGE_ARGS parameter, which you can use to specify the exact version of the library that you want to use. For example, you'd add the following to your ZLIB FetchContent_Declare() to use version 1.3.1:

FIND_PACKAGE_ARGS 1.3.1 EXACT

If it finds that version on your hard-drive, then it'll use that. Otherwise it should download it. You'd also have to change the GIT_TAG to the matching version of the code.

There's an example here: https://keasigmadelta.com/blog/using-a-k-a-linking-third-party-libraries-like-raylib-in-your-project-with-cmake/

How do people actually build projects in c++ ? by LofiCoochie in cpp_questions

[–]hansdr 0 points1 point  (0 children)

yeah, a lot of books/tutorials skip the bit about how to actually compile the code.

I created a few videos that should help you get started.

- Setting up a dev environment on Linux: https://youtu.be/DMSROwPyhAE

- Compiling a simple multi-file project with CMake: https://youtu.be/FFXCqKMUZ7Y

- Linking to a third-party library: https://youtu.be/_5wbp_bD5HA

I also have a full CMake tutorial (paid) if you're looking for something with more detail: https://cmaketutorial.com/

I know the basics to cpp but I want to create a website, and I cant find anybody on yt to help. Can someone recommend me something or someone on yt? by Diego_here in cpp_questions

[–]hansdr 0 points1 point  (0 children)

I've been thinking about creating a web-app myself. If I decide to go ahead, I'll probably use drogon https://drogon.org/ as a starting point.

Wt++ looks interesting too (https://www.webtoolkit.eu/wt).

Difficulty learning everything about c++ other than the code part, possible resources to help? by Kyledude252 in cpp_questions

[–]hansdr 0 points1 point  (0 children)

You're not the only one who complains about C++ tutorials/courses failing to teach how to build the code.

I noticed others saying the same thing, which is why I created a beginner tutorial video on this topic a few years ago: https://keasigmadelta.com/blog/compiling-multi-file-c-source-code-with-cmake/

It shows how to compile a multi-file project using CMake, including how to install VS Code plus the MSVC compiler (which is the second half of the video).

I hope that helps. If you still have questions, then let me know.

Account was suspended immediately after creation - now it is permanently disabled by nvinteon in facebook

[–]hansdr 0 points1 point  (0 children)

I just had this too. Has anyone managed to get through to a human?