Skip to content

Instantly share code, notes, and snippets.

View dmcleish91's full-sized avatar

Dwight McLeish Jr dmcleish91

View GitHub Profile
#include "stdafx.h"
#include <iostream>
#include <string>
#include <random>
#include <ctime>
using namespace std;
int x;
bool play_game;
#include "stdafx.h"
#include <iostream>
using namespace std;
struct newEnemy // struct is a way of storing multiple values in one variable
{
int x_position;
int y_position;
int shipattack;
#include "stdafx.h"
#include <iostream>
// this is a concept showing how we can use pointers to dynamically change the size of an array
using namespace std; //this calls the standard library it makes typing somewhat easier
int *growArray(int* p_values, int cur_size); // this is declared so it can see the function after main
int main()
{
int next_element = 0; // elements in an array
// ConsoleApplication3.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
// ConsoleApplication4.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <ctime>
#include <iostream> // input output library
#include <random> // preferred C++ random library