Finished with GAM 374

Well, I chose to turn in exactly what you see in that last blog post. Everything that was required for the assignment was there and it earned me a 95%.

I am now focusing my efforts into work with a near-full-time schedule of 38 hours a week. I will be posting stuff about happenings relating to that from here on out.

I’m also working on an Android app, so there will be some Java tossed in.

And last but not least, my love for C++ is growing as I discover C++11 features. There’s a little code I wrote to test out the functionality of some of the new stuff if you read on.

#include 
#include 
#include 
#include 
#include 

using namespace std;

int main()
{
	cout << "BASIC USE OF AUTO\n";
	auto hi = "Hello, World!";
	cout << hi << endl;

	cout << "\nLAMBDA FUNCTIONS\n";
	auto squareIt = [hi](int i) { cout << hi << " from inside a lambda! "; return i * i; };
	cout << squareIt(10) << endl;

	cout << "\nPOINTERS AND NULLPTR\n";
	shared_ptr sp;
	unique_ptr up;
	weak_ptr wp;
	auto pointer = nullptr;

	cout << "\nUNIFORM INITIALIZATION AND INITIALIZER LISTS\n";
	int x{ 17 };
	cout << x << endl;
	vector v{ 2, 1, 7, 9, 4 };

	cout << "\nRANGE FOR\n";
	for (auto d : v)
	{
		cout << d << endl;
	}

	cout << "\nNONMEMBER BEGIN AND END\n";
	sort(begin(v), end(v));

	for (auto d : v)
	{
		cout << d << endl;
	}

	cout << "\nCOMBINATION OF NONMEMBER BEGIN AND END AND LAMBDA FUNCTIONS\n";
	find_if(begin(v), end(v), [](int i) { if (i % 2) { cout << i << endl; } return 0; });

	cout << "\nTHREADS\n";
	for (int i = 0; i < 100; ++i)
	{
		thread([]{ cout << "I'm a thread! " << this_thread::get_id() << endl; }).join();
	}

	cin.get();
	return 0;
}

That’s all for now! Thanks for reading.