0
What is a block and stream?
The question came to me when I was just starting c++ and I'm still a bit doubty since I don't understand that much by the app's definition.
4 Respostas
+ 2
In C++, output stream is bytes of characters flowing from memory to a printer,
screen or disk drive. The cout object is
connected to the output devices just mentioned above , such as your screen.
The input stream is bytes of characters flowing from devices such as a keyboard
or a disk drive to memory . The cin object is usually
connected to the keyboard.
A block of code is a group of statements
treated as a unit. Such as a function, or
a loop or a if- then statement.
+ 1
Wow this is all so complete. I really appreciate the help! Thank you all. I'm learning alot from these explinations.
0
block: Anything enclosed by curly braces is called a block.
eg.
void main(){
block 1..
public void hello(){
block 2...
}
}
stream: Stream is a logical path between your program and the file you want to manipulate.