Finished inline files.

This commit is contained in:
Nicolás A. Ortega Froysa 2022-05-23 11:47:04 +02:00
parent fddc7e51ad
commit af17057076
2 changed files with 8 additions and 10 deletions

View File

@ -1,13 +1,12 @@
#include <cstdlib>
#include <iostream>
inline void print_prog(char *prog_name)
inline int __attribute__((always_inline)) sum(int a, int b)
{
std::cout << "Program name: " << prog_name << std::endl;
return a + b;
}
int main(int argc, char *argv[])
int main()
{
print_prog(argv[0]);
int aux = sum(7,9);
return EXIT_SUCCESS;
}

View File

@ -1,13 +1,12 @@
#include <cstdlib>
#include <iostream>
void print_prog(char *prog_name)
int sum(int a, int b)
{
std::cout << "Program name: " << prog_name << std::endl;
return a + b;
}
int main(int argc, char *argv[])
int main()
{
print_prog(argv[0]);
int aux = sum(7,9);
return EXIT_SUCCESS;
}