Yeah...that is easy to understand loops. I know what each loop does. But the problem with me is that each new problem creates new troubles for me. I get stucked and if somehow I can solve one, there is always a better solution on web and that discourages me. Every problem related to loops is confusing. I would like to clear that I am a beginner but is that really normal for a beginner? What would you expect from a beginner who started learning c++ from the last month?
-
I vote to close this question because it's unclear what you're asking – Hatted Rooster Aug 07 '15 at 13:41
-
I vote to close too but *yes, was really normal for all of us* :D – fantaghirocco Aug 07 '15 at 13:42
-
There will always be a better solution out there, just learn from these solutions and grow. The process of learning and getting better should be encouraging in itself. – Calum Aug 07 '15 at 13:45
-
If "better solutions" demoralize you, don't *ever* go to Boost's website. Anyway. I notice that you tagged this [tag:c++11], which sets you well ahead of most beginners already. If you want some competent advice on a working piece of your code, you can post a question on [codereview.se]. StackOverflow here is for code that doesn't work, so people can help you spot the problem. Beware to make it a *good* question though, have a look around to know what to do and not to do. Welcome to the Stack ! – Quentin Aug 07 '15 at 13:51
-
I'm voting to close this question as off-topic because it is about piping knowledge into a human rather than source code into a compiler. – Quentin Aug 07 '15 at 14:01
-
@Quentin, Jamey D, fantaghirocco It's okay. I was just curious to know what stack guys felt when they started because I don't have any programmer friend who can share experiences with me. Thanks for your replies. :) – Aug 07 '15 at 14:41
2 Answers
Don't be disappointed by seeing that there are better solutions out there. There will always be something better. The important thing is that how much you learn from your each experience. Try to implements the things you learn each time you code. One month is too less of a time to get used to any language. You will get better. I also felt similar things when I started to code. Things will become more clear with each experience you face. Just trust yourself and code. It will be fun :)

- 72
- 1
- 11
-
But what if I can't even solve this. Each number triangle asks for new solution/algorithm. All previous ones are different from the current. – Aug 07 '15 at 13:50
-
1Don't forget that you just started coding, and you are not expected to know solutions for all answers. I have been in your shoes. I had to see answers for many simple questions. It happens. Don't be disappointed. And again, algorithms are designed by some great people. You are not expected solve them, you are expected to derive a meaning from them. So, another reason for you to not lose hope :) – harsha217 Aug 07 '15 at 13:55
-
-
Probably wrong place to ask. But you should ask the compiler to give you all warnings and debug info (e.g. compile with g++ -std=c++11 -g -Wall -Wextra
) and you should learn to use the debugger (gdb
).
With the debugger you are able to run your (or some other) program step by step and query the process state, e.g. the values of global or local variables, and the call stack (e.g. backtrace
or bt
ith gdb
)
BTW, you might read the SICP book. It is not C++ oriented, but it is a wonderful book to learn programing (and what you'll learn will be useful in C++).

- 223,805
- 18
- 296
- 547