C++ Programming Tutorial 6 - Variable Declaration and Initialization

preview_player
Показать описание


~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~ SUPPORT ME ~~~~~~~~~~~~~~

🅑 Bitcoin - 3HnF1SWTzo1dCU7RwFLhgk7SYiVfV37Pbq
🅔 Eth - 0x350139af84b60d075a3a0379716040b63f6D3853
Рекомендации по теме
Комментарии
Автор

Teachers never teach this kinda stuffs. They be like let's start they make a program that's it
and there is no explanation.

rengokuhasira
Автор

Please explain to me better why cout displays 6 even even you give the value of 1000 to children or slices.
It doesn’t override 6

m.a.diallo
Автор

Starting this journey tonight! So far I love your videos and appreciate your teaching style. I can’t wait to see how much I know after even 50+ videos.

misty
Автор

Im having so much fun learning c++, thanks for the great tutorials

kyzer_wilhelm
Автор

I LOVE your content you make it SUPER easy to understand programming!

cerium
Автор

Caleb: "You're never going to get away from variables in programming"
*laughs in Haskell*

ostiedestrie
Автор

The reason you don't use quotes for cout << slices; is because the quotes would make it a string

japaneseextremme
Автор

For everyone watching this tutorial on a mac you can use the terminal command without the parenthesis (g++ YOUR_FILE_NAME.cpp; ./a.out) to run everything in one command

samuelfischer
Автор

I found this very int-eresting; thanks for sharing!

PunmasterSTP
Автор

Thank you for making these. I really appreciate it.

TheDarkKRoo
Автор

It would be interesting why one has to set a type for each variable and how it is represented in memory. To do this you would have to introduce the concept of the binary system. Also you could say that an uninitialized variable has the value that is in this part of the computer's memory at this time. So it can be different each time you start the program. Just as a hint because it happens that someone tries to access a variable which hasn't been initialized before which will likely cause errors.

disdonc
Автор

Thanks very much for your clear presentation. My question is; How can I declare, initialize and assign the following integers 20;30;24;25 as the marks of my students, for instance if I was a lecturer?

ndereratjijahura
Автор

turning children into slices



^_^

adamm
Автор

Which of the variables is not initialized?
int age = 18;

double GPA = 3.25;

char letterGrade= ‘A’;

bool done = false;

int age = 18, length, width = 5;

mashalabouzour
Автор

to clarify:

int slices;
slices = 5 + 1;
int children = slices;

slices = 1000;

returns 6


BUT:

int slices;
slices = 5 + 1;
slices = 1000;

int children = slices;

written in this way will the function return 1000?

DoraKage
Автор

is int slices = 5; the same as int slices(5); ?

Koto-Sama
Автор

I came across one conundrum of a line of cpp to run past you.

*virtual void* OnUpdate( *uint_32_t* deltaTime);

What the heck is "virtual void" and how does anything with "void" have an operation associated? I thought "void" specifically means return nothing.
I came across this while trying to figure out how someone else's library works for use with a rotary encoder and Arduino. This was in the library's header source code.

UpcycleElectronics
Автор

I have a question,
int main ( )
the same as
int variable
(both "int" the same)

garyjoy
Автор

watched. How can slices have two different integers??

krish-utde
Автор

Is it better to initialize variables, that aren't set a value as soon as they're declared, to a value like 0, 0f, or and empty string (depending on the type)? Sometimes it's hard to build good habits with small programs, as it's easier to keep track of everything.. didn't know if a value you should placed in variables to act as a placeholder for ease of not hitting errors down the road. Does it matter?

dubs