Remove unused code and migrate to CMake build system.
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
#include <iostream>
|
||||
#include "functions.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
void functionB() {
|
||||
}
|
||||
|
||||
void functionC(); // forward declaration
|
||||
void functionD(); // forward declaration
|
||||
|
||||
int main() {
|
||||
const char *lang = "C++";
|
||||
std::cout << "Hello and welcome to " << lang << "!\n";
|
||||
|
||||
for (int i = 1; i <= 5; i++) {
|
||||
std::cout << "i = " << i << std::endl;
|
||||
}
|
||||
|
||||
// functionA(); // compiler error - function is defined after call
|
||||
functionB(); // no error - function is defined before call
|
||||
// functionC(); // linker error - function is declared but not defined
|
||||
functionD(); // no error - function is declared and defined
|
||||
functionE();
|
||||
// functionF(); // linker error - function is defined twice
|
||||
|
||||
// byte b;
|
||||
short s;
|
||||
int i;
|
||||
long l;
|
||||
long long ll;
|
||||
|
||||
cout << "size of short: " << sizeof(s) << endl;
|
||||
cout << "size of int: " << sizeof(i) << endl;
|
||||
cout << "size of long: " << sizeof(l) << endl;
|
||||
cout << "size of long long: " << sizeof(ll) << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void functionA() {
|
||||
}
|
||||
|
||||
void functionD() {}
|
||||
Reference in New Issue
Block a user