-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
50 lines (38 loc) · 914 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include <iostream>
#include <ostream>
//* Funcion anticipadas:
/*
* permite declarara un funcion sim implementacion
* para se llamado independientemente del orden
*/
/*
void llamarB() {
llamarA(4, 4); // error por que la fucion no esta difinida todavia hasta que pase a la linea 12
}
void llamarA(int n1, int n2) {
llamarB();
}
*/
// * Prototipos
// void llammar_A(int, int ); //* Desaconsejable
int llamar_A(int n1, int n2);
void llamar_B() {
std::cout << "Funciones anticipadas\n";
std::cout << llamar_A(4, 4) << std::endl;
}
int llamar_A(int n1, int n2) {
return n1 + n2;
}
//* Funcion anticipadas - END
void imprimir(int num) {
std::cout << "Ejecutando la funcion imprimir()\n" << num <<"\n";
}
int devuelveNumerico(int num) {
return num;
}
int main() {
imprimir(devuelveNumerico(94));
int numero { devuelveNumerico(2) };
llamar_B();
return 0;
}