Declaration
For the cat, the function sound()
declaration and call will look:
#include <iostream>
using namespace std;
// Function declaration
void sound() {
cout << "meow!" << endl;
}
int main() {
// Call the function to be executed
sound();
return 0;
}
Remember:
- you have to declare a function before calling it.
- you can declare the function as many times as you want.
You have met functions at the beginning of your C++ programming path. main()
- is the pre-defined function that is used to execute the code.
1. You have to...
2. Every program in c++ contains the function:
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 4. Capítulo 2
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Awesome!
Completion rate improved to 2.94
Declaration
Desliza para mostrar el menú
For the cat, the function sound()
declaration and call will look:
#include <iostream>
using namespace std;
// Function declaration
void sound() {
cout << "meow!" << endl;
}
int main() {
// Call the function to be executed
sound();
return 0;
}
Remember:
- you have to declare a function before calling it.
- you can declare the function as many times as you want.
You have met functions at the beginning of your C++ programming path. main()
- is the pre-defined function that is used to execute the code.
1. You have to...
2. Every program in c++ contains the function:
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 4. Capítulo 2