Add .gitignore and IntelliJ IDEA project configuration files and projects for cpp intro, pointers and classes
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
#include <iostream>
|
||||
#include "functions.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
void functionB() {}
|
||||
void functionC(); // forward declaration
|
||||
void functionD(); // forward declaration
|
||||
|
||||
int main() {
|
||||
std::cout << "Hello, World!" << std::endl;
|
||||
|
||||
// functionA(); // compiler error - functionA is defined after call
|
||||
functionB(); // no error - functionB is defined before call
|
||||
// functionC(); // linker error - functionC is declared but not defined
|
||||
functionD(); // no error - functionD is declared and defined
|
||||
functionE();
|
||||
// functionF(); // linker error - functionF is defined twice
|
||||
|
||||
byte b;
|
||||
int8_t b2;
|
||||
short s;
|
||||
int i;
|
||||
long l;
|
||||
long long ll;
|
||||
|
||||
cout << "size of short: " << sizeof(short) << endl;
|
||||
cout << "size of int: " << sizeof(int) << endl;
|
||||
cout << "size of long: " << sizeof(long) << endl;
|
||||
cout << "size of long long: " << sizeof(long long) << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void functionA() {}
|
||||
void functionD() {}
|
||||
Reference in New Issue
Block a user