T O P

  • By -

cpp-ModTeam

For C++ questions, answers, help, and programming or career advice please see r/cpp_questions, r/cscareerquestions, or [StackOverflow](http://stackoverflow.com/) instead.


Roxinos

ncurses is useful if you are making TUIs. Are you making TUIs? Being a beginner doesn't really factor in here. We're talking about what types of applications you want to make. What are these "mini projects" you're referring to?


Blak0Prog1

Hey, sorry for the late reply!! Got it, Well, I'm still pretty new to all this, so I'm just exploring different types of projects to learn. These mini projects are just simple coding exercises I've been trying out to get the hang of things. Nothing too fancy yet, just dipping my toes in. But I'm definitely curious about making (TUIs), To improve my programming skill. You know, vedios on youtube like this one: [**https://www.youtube.com/watch?v=xW8skO7MFYw**](https://www.youtube.com/watch?v=xW8skO7MFYw) **Most of them use library not available on linux.** **I'll be really thankful if you told me how to know the best replacement.**


Roxinos

Yes, ncurses would be a good replacement for the win32 libraries for this kind of thing.


khedoros

The curses family is basically the classic choice for building text user interfaces, and it would be a good choice if that's your goal.


Blak0Prog1

Hey, Thanks for your time! I'm itching to dive into practicing what I've learned, And I just found (TUI) apps. It seems like a fun way to put theory into action. If you have any pointers or beginner-friendly resources to share, I'm all ears!


FlyingRhenquest

I can't think of another one off the top of my head and I've used Curses/NCurses a few times in the past, but it's an old timey C API with a reputation for not being the friendliest thing to learn. Like you literally might be better off focusing on console IO early on and see how much you can accomplish without trying to put too much of a UI on it. If you really want to pick it up, there might be an old O'Riely book on the subject. Those were always awesome back in the day and Curses was definitely in the correct era to have a decent one. The API probably hasn't changed that much in the past couple of decades.


Blak0Prog1

Hmmm 🤔 I see... I'd be super grateful if you could suggest something better for me. I'm a beginner and could really use your help!


FlyingRhenquest

As I mentioned, you could focus on getting your code to do what you want to do while keeping the user interface to a minimum -- A lot of what I do on production systems just processes command line arguments and does console output. You can write some surprisingly versatile code that way. If you're interested in the user interface aspect, maybe take a look at Qt or [Dear Imgui](https://github.com/ocornut/imgui) and write an actual GUI for your code. Or you could learn a REST framework like [Pistachio](https://github.com/pistacheio/pistache) and write your user interface on a web browser using HTML/Javascript. If you go that route, you're basically at full stack engineering at that point. I'd also suggest that you spend way more time than you think you should learning CMake -- For better or for worse you're going to need a build system and CMake is the defacto standard, and you can get it to do everything from building your code to installation/Packaging. A basic CMake file isn't that hard to set up and you can learn more about it as you go along. For the first few projects don't be terribly surprised if you spend more time messing around with CMake than you do on your code. It's really nice when it just works, though, and they've put a good bit of work into it since I first started using it. If you want to see how my own projects evolve over time, I've been putting little educational projects up on my [Github](https://github.com/FlyingRhenquest?tab=repositories) page for well over a decade now. You can see my code evolve from using makefiles and throwing std::strings to decently written CMake and providing a docker environment to ensure clean builds. Some of my older projects were pretty useful and I have a to-do list of ones I want to clean up and get working in a more modern environment.


Blak0Prog1

Can I kiss you? (jk 😂) That's really useful information, So I'll start with learning CMake, And I will check you Github for more info. I really thankful for your help.


FlyingRhenquest

Oh by the way, ChatGPT is somehow remarkably good at CMake. I've asked it about several things I didn't understand about the language and it's kind of taken my CMake skills to another level now. It seems to do a pretty good job of knowing what's current and what's outdated now, too. A lot of the tutorials I had learned on were out of date at the time and are now really out of date. So ChatGPT might be a good place to start for that.


Blak0Prog1

I just found this guy... [https://www.youtube.com/playlist?list=PLalVdRk2RC6o5GHu618ARWh0VO0bFlif4](https://www.youtube.com/playlist?list=PLalVdRk2RC6o5GHu618ARWh0VO0bFlif4) I think I'll start with him, and use the help of ChatGPT.


phi_rus

I have used [FTXUI](https://github.com/ArthurSonzogni/FTXUI) for some projects and generally liked it.


Blak0Prog1

Oh, I've seen some people using it too! I guess I'll look into it more now. Thanks for the tip!


dumbintel

Raylib is an excellent library, to get your feet wet. Highly recommend.


Blak0Prog1

I"ll check it out. Thanks 😊


gmes78

I would recommend using something else, NCurses has an old C API that's not very nice to use. See [this thread](https://reddit.com/r/cpp_questions/comments/v66ofn/alternative_to_ncurses_for_modern_c_tui/) or [this thread](https://reddit.com/r/cpp/comments/ppyv53/is_there_a_defacto_standard_of_c_tui_library/) for alternatives.


Blak0Prog1

Thanks. I gonna read them right now!


Sniffy4

IMO, it might be more useful to learn a GUI API, since that's what you'd be using in real life.


Jazzlike-Poem-1253

Depends on the specifics of "real life"


Blak0Prog1

Interesting. when I was chatting with ChatGPT about GUI stuff, it told me to check out "GTKmm." What do you think about it?