For a different perspective, I already "knew" much of the content of this video, specifically how things behaved. But I didn't understand that data is COPIED, which he mentioned early in the previous video.
After watching episode 66-68 I extrapulated that const should be used only when passing arrays to functions. Since all other types are passed by value unless you want the function to have the ability to change the value. Am I understanding this correctly?
What about swapping back to the original numbers? I want to swap to use for calculation purposes, but then use the original numbers for printing purposes. New to C++. TIA!
Please tell me how i can do it without any integer on my code. I want to just type two numbers on terminal then i want to got output . For example Terminal: 10 5 5 10. . I want to do exactly like that. And i want to left 1 space beatwen integers on terminal also. Beside i want to write just function on my code to implement this output on my terminal.
The way that I swap ints without using a temp if anyone is interested:
void swap(int &a, int &b){
a = a + b;
b = a - b;
a = a - b;
std::cout
Okay, this one really tied in in better. You almost lost me last video. This was a good enforcer.
For a different perspective, I already "knew" much of the content of this video, specifically how things behaved. But I didn't understand that data is COPIED, which he mentioned early in the previous video.
WHYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY EVERY SINGLE VIDEO
@@liampapavasiliou9658 Why not, Liam? Why not?
This code is really good Caleb! :D Thanks!
After watching episode 66-68 I extrapulated that const should be used only when passing arrays to functions. Since all other types are passed by value unless you want the function to have the ability to change the value. Am I understanding this correctly?
What about swapping back to the original numbers? I want to swap to use for calculation purposes, but then use the original numbers for printing purposes. New to C++. TIA!
can we use it for strings?
yes
Please tell me how i can do it without any integer on my code. I want to just type two numbers on terminal then i want to got output . For example
Terminal:
10 5
5 10.
. I want to do exactly like that. And i want to left 1 space beatwen integers on terminal also. Beside i want to write just function on my code to implement this output on my terminal.
Fantastic example
awesome video
Hey, did you hear about this IDE that dogs can use to code? ...Sorry, I forgot the punchline. Maybe it was related to a sponsor or something?
THANK GOD bro i was going insane wondering why the numbers weren't swapping, its cause i forgot the &
tnks
Thanks
0:55