Heres my problem with learning c++ ..Im not regular

I learn for 2 weeks, then nothing for another 2 weeks. Then I restart, rereading what I already learnt..im wasting my time :(
Sounds like you got a problem with motivation and/or something to actually do. Try doing a little project, that's always fun. Game a small 2D Game.
I had the same problem when starting to learn the language. It can be quite hard to keep your motivation when starting to learn C++, the language is complex and it might be hard to understand when you've just started programming. The way I used to keep my motivation up was to do small projects that actually interested me. For example, I'm interested in operating systems and the core utilities they came with, so I started creating a few simple Linux command-line programs for Windows. A few examples of programs I learned C++ with:

-Writing the program echo (learing about std::cout).
-Writing the program yes (learning about loops).
-Writing the program cat (learning about file streams).
-Writing the program less (not a complete version, just one that displays a file 10 lines at a time, combines standard streams, file streams and loops)
-Writing a program that encrypts a file (look up "bitwise XOR encryption", it's a very simple way to encrypt and decrypt a file, learning about bitwise operators and file streams).
-Write a program that remembers things for the user, give it 3 commands: "remember", "speak" and "forget", remember allocates memory and stores a bit of text, then gives a number back, "speak" takes the number remember gave, then shows the text, "forget" takes a number, then deallocates the memory (learning about dynamic memory management).
-Writing a small CMD program (learning about std::cin, just read the command and pass everything to std::system, it's a small solution that does execute quite a lot of commands without you having to worry about implementing them yourself).
-Create a small library with useful classes, try building yourself a String class to begin with, use std::string as an inspiration and implement a bit of its functionality, don't forget to build your own exception classes (combines everything in the tutorial).

There's quite a lot of ideas you can come up with. Just don't try to do the entire tutorial in one go, read 2 or 3 chapters, make a small project where you can practice on them, then go to the next part. If you're out of ideas, just look at your own computer, it's full of command line programs that are not that hard to write yourself.
Last edited on
closed account (E0p9LyTq)
If you have as much trouble learning C++ programming as you indicated, then possibly being a programmer is not for you. Or you need to learn C++ by a different approach. A structured class-room environment for instance.
THanks a lot!!!!
Really helpful!
Topic archived. No new replies allowed.