Nota berkaitan C++
Written on: March 19, 2021
Last updated: September 20, 2023
[
programming,cplusplus
]
Comments
- Untuk single line comments :
#include <iostream>
//Contoh single line comments
int main()
{
std::cout << "Hello World";
//Contoh single line comments
return 0;
//Contoh single line comments
}
- Untuk multi line comments :
#include <iostream>
/* Contoh multi line comment
* Project A
* Made by B
* And bla bla bla
* comments end here */
int main()
{
std::cout << "Hello World";
return 0;
}
Statement
C++ mengandungi beberapa statement,antaranya ialah :
- Declaration statements
- Jump statements
- Expression statements
- Compound statements
- Selection Statements ( Conditional )
- Iteration statements ( Loops )
- Try blocks