+ 1
What's the difference between "- Tutorial" and "- Fundamentals"?
I've had this question ever since I installed SoloLearn and I still haven't found the answer... It's kinda confusing so I'd appreciate an answer.
8 Respostas
+ 8
Fundamentals: the basic knowledge you require to do a task. i.e you must know how to bounce a ball before you can attempt to play basketball.
Tutorial: A teaching instrument. Shows how to do something. I.e Someone demonstrating how to bounce a ball could be considered a tutorial
+ 6
This is called a default value. which is what this section is trying to teach.
if nothing is passed the default value is used.
int defaultVal(int a, int b=1)
{
return a +b;
}
cout <<defaultVal(1); // answer 2
it is not an error
+ 3
Yeah I should have kept going instead of starting crying. It becomes pretty clear afterwards in the tutorial ... My bad : /
+ 2
I think that they are the same. "Fundamentals" and "Tutorial" should be the same thing, but I'm not 100% sure.
+ 2
Error in C++ tutorial ??
In the " default values for parameters " of the C++ tutorial, the exemple declares two parameters ( a,b ) and then in the second section of the exemple, parameters ( x,y ) are declared with new ( different values ). Then, it seems that the value declared for b is recycled ( passed ? ) to y ... but without any code asigning b's value to y. Other users seem to be confused too ... Any super-user can take me by the hand ?
+ 2
It's in : Functions > Default arguments
0
But then... what would be the point? They would call everything the same... 🤔
0
I think they use it to define web and game design? Don't know, sorry.