New course! Every coder should learn Generative AI!
Try a free lesson+ 2
C++
can anyone help me in c++ because im finding it very hard
10 Answers
+ 3
"Nothing worth having is attained easily" -- someone.
You need to ask a question mate, like what you're struggling with. For now, maybe quit C++ and start C instead. All C++'s paradigms can be daunting for a newcomer.
+ 1
I started in may and im having trouble in the 2nd module and they dont have C
+ 1
then go for c#
+ 1
xD thnx
0
If you're new and started in May, expect difficulty. Loops and stuff are pretty simple (you said module 2) and you'll have to face them in almost any language. Lemme break it down:
DO...
all this
...UNTIL THAT
Basically, it's a goto statement. Simply put, an area of memory is jumped to and that code is executed every time the "condition" is true. You may want to look into web stuff if this confuses you. Learning any C-language or any structured programming language may be out of your grasp until you're more comfortable with the idea of Cause and Effect.
0
so....is it like a variable?
0
no
0
and I love cause and effect my favorite lesson in school
0
and im already passed loops in c#
0
If you're past loops in C# then C++ should be no different. In most languages, any loop is this...
label:
action one
act two
blah blah
test (condition)
goto label if test was true.
That's the most I can simplify. The jump/goto point is not a variable (though the address is stored in a register). So...
int a = 5;
while (a > 0) { // Here's the label
a = a - 1;
// Body inside loop
}
// Imagine the if-goto here
...Maybe that makes sense?