This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "stdafx.h" | |
| #include <iostream> | |
| #include <string> | |
| #include <random> | |
| #include <ctime> | |
| using namespace std; | |
| int x; | |
| bool play_game; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ConsoleApplication3.cpp : Defines the entry point for the console application. | |
| // | |
| #include "stdafx.h" | |
| #include <iostream> | |
| #include <cstdlib> | |
| #include <ctime> | |
| using namespace std; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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 |
NewerOlder