Комментарии:
Okay, this one really tied in in better. You almost lost me last video. This was a good enforcer.
Ответитьawesome video
Ответитьcan we use it for strings?
Ответить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?
ОтветитьThis code is really good Caleb! :D Thanks!
Ответить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 you so much
ОтветитьThanks
Ответить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 << a << ", " << b << "\n";
}
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!
ОтветитьFantastic example
ОтветитьTHANK GOD bro i was going insane wondering why the numbers weren't swapping, its cause i forgot the &
Ответитьtnks
Ответить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.