Hello, I'm a beginner programmer and I was looking to see if anyone has a book or online tutorial that they have either used or heard about that's any good. I've seen a lot of online tutorials but they seem to get a bit dodgy when talking about Arrays and strings so if anyone has a recommendation I would gladly appreciate your help. I'm a little short on cash though :) lol.

Dani AI

Generated

flagged the right pain points: arrays and strings are where many beginners trip up. 's suggestion to use a beginner book and 's pointer to the forum README are both reasonable starting moves, but a short, practical plan will save time and confusion.

Focus first on the standard library: prefer std::vector<T> for dynamic arrays and std::string for text. Use std::array<T,N> when you truly need a fixed-size array. Learn why sizeof(arr)/sizeof(arr[0]) works only while a C array is still in scope (it fails after the array decays to a pointer), and prefer container.size() for standard containers. Avoid raw C-string functions like strcpy/strcat/gets; strncpy has quirks (it may not null-terminate). When you must call C APIs, use s.c_str() to get a const char*.

Practical habits that cut bugs: compile with warnings enabled (-Wall -Wextra -pedantic), use a modern standard (-std=c++17 or newer), and enable sanitizers (-fsanitize=address,undefined) while testing. Exercise tasks: manipulate a std::vector, parse lines with std::getline into std::string, and implement a small function that returns a std::string instead of a char*. If money is tight, follow curated lists (the forum README mentioned by ) and free official docs/tutorials; if you can buy a book, 's tip is worth considering.

Recommended Answers

All 3 Replies

On that note, never mind. I see several topics about good books. But thanks anyway.

C++ A Beginner's Guide

Anyways i recommend you get it it's good, please mark this topic solved.

Did you read the big fat README: just above you own post?

[edit]

Ahh, I see you did. Good job! We posted simultainiously ;)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.