S.
And
Hi to all!
VJ
Can any explain the answer of above program
VJ
Mat
Can any explain the answer of above program
What do you need? Which part did you miss?
Victor
Okay. If it's a USD then why is the function name 'main' always?...we can write any other name right?...and why is that the execution starts only from main function?
Because another library function (e.g. the __libc_start_main() function or the mainCRTStartup() function) needs to call the main() function, which you should define.
VJ
I got 12,20 Compiler says 16,25
Anonymous
Hello everybody🙋‍♀️
Anonymous
I need your help
Anonymous
I`m going to learn C++ programmming from "0"
VJ
Z= 4*5 Z= 20 same goes for a 3*4= 12 Crct me
Mat
Which part I miss??
Lines: 1. a = 3 2. ++a two times means a = 5, so z = 25 Did you think like that?
Anonymous
But, I don`t have any materials
Anonymous
Can you share me any materials which you practised ???
MᏫᎻᎯᎷᎷᎬᎠ
VJ
I got it
Mat
I got it
Great :)
Anonymous
Pleaseeee🙏
Nehemiah Aklil
Mat
Can you share me any materials which you practised ???
Youtube, books, FOSS projects, guides. Things like that
Nehemiah Aklil
Pleaseeee🙏
i used youtube
MᏫᎻᎯᎷᎷᎬᎠ
Pleaseeee🙏
What do you want
Mat
Udemy or Udacity have some useful stuff
Anonymous
unfortunately, we can`t use from youtube
Anonymous
Can you share me, please?!
MᏫᎻᎯᎷᎷᎬᎠ
VJ
Can you share me, please?!
https://www.freetutorials.eu/beginning-c-programming-from-beginner-to-beyond-1/
S.
that's reference
S.
but the code is, strange
MᏫᎻᎯᎷᎷᎬᎠ
well Here is an example int a = 0; int &r = a; // r is references r = 9; cout << a; output: 9
klimi
& means reference afaik
Mihail
but the code is, strange
It's a for each loop if you've never seen one
Mihail
Use that if you want to make any modifications to the original value
Mihail
Was talking to the other guy
MᏫᎻᎯᎷᎷᎬᎠ
The other 30% is that references work as alias
MᏫᎻᎯᎷᎷᎬᎠ
And you can pass it as a functions arguments
ojas
well Here is an example int a = 0; int &r = a; // r is references r = 9; cout << a; output: 9
If you don't want to get into the details then here is the elevator pitch: It's like pointers except that the dereferencing (the * operation) is done automatically.
MᏫᎻᎯᎷᎷᎬᎠ
Without the need of calling delete operator
MᏫᎻᎯᎷᎷᎬᎠ
It's a automatic variable
ojas
BTW, I mistakenly replied to you instead of the OP :p
Mihail
Sort of yes
MᏫᎻᎯᎷᎷᎬᎠ
Basically yeah
MᏫᎻᎯᎷᎷᎬᎠ
That's enough of understanding for you as a beginner
Mat
Sort of. Instead of copying the actual value of a into i, you create a reference to it
VJ
VJ
Y the values are not swapping in above program??
Dima
wtf
Roxifλsz 🇱🇹
Wew
😂
Mat
10 has no reference
Jonathan
4
Mat
There's no place holding 10 somewhere
VJ
4
No in compiler I got 2016
VJ
Values didn't swap
Jonathan
No in compiler I got 2016
I checked by eye he is swapping place b with a so it should be 4
VJ
Jonathan
Ditch the & when calling function
Jonathan
It shows error
Yeah 😅 I just looked at it again he's function block was wrong
Jonathan
Haha the galre back on my bold head 😂
Anonymous
Good book name
Hackers
Gud.
Walter
How to stay focused while programming ...Any tips pls??
Anonymous
disconnect your WiFi
klimi
How to stay focused while programming ...Any tips pls??
Tell yourself that you will do it now
Walter
klimi
why?
Walter
why?
Social media and other stuffs
klimi
you use facebook? instgram?
klimi
you can try separate working space from casual place