1: //TestStuff20141008.cpp
2: //Wednesday, October 8, 2014
3:
4: #include <iostream>
5: using namespace std;
6:
7: #include "utilities.h"
8: using Scobey::Pause;
9:
10: int main(int argc, char* argv[])
11: {
12: //int a[] = { 2, 4, 6, 8, 10 };
13: ////int a[5] = { 2, 4, 6, 8, 10 };
14: ////int a[]{ 2, 4, 6, 8, 10 };
15: ////int a[5]{ 2, 4, 6, 8, 10 };
16: //int* aPtr = &a[3];
17: //cout << aPtr << endl;
18: //cout << *aPtr << endl;
19: //aPtr = &a[0];
20: //cout << aPtr << endl;
21: //cout << *aPtr << endl;
22: //aPtr = a;
23: //cout << *a << endl;
24: //++aPtr;
25: //cout << *aPtr << endl;
26: //++aPtr;
27: //cout << *aPtr << endl;
28: //int* a = new int[5]{1, 3, 5, 7, 9};
29: //for (int i = 0; i < 5; i++)
30: //{
31: // cout << a[i] << endl;
32: //}
33: //delete[] a;
34: //for (int i = 0; i < 5; i++)
35: //{
36: // cout << a[i] << endl;
37: //}
38:
39: //char a[] = { 'S', 'M', 'U' };
40: //cout << a << endl;
41:
42: char a1[] = { 'S', 'M', 'U', '\0' };
43: cout << a1 << endl;
44: char a2[] = "SMU";
45: cout << a2 << endl;
46: char* a3 = "SMU";
47: cout << a3 << endl;
48:
49: char* a4 = "Hello, world!";
50: cout << a4 + 7 << endl;
51: cout << *(a4 + 9) << endl;
52:
53: int a[]{1, 2, 3, 4, 5};
54: int aPtr = a;
55: cout << a << endl;
56: }