Skip to content

Commit

Permalink
Added MakeFile
Browse files Browse the repository at this point in the history
Ignored Game executable
Deleted accidentally uploaded test file
Modified UserInterface.cpp to not have warnings
  • Loading branch information
Sheidbrink committed May 14, 2015
1 parent 3813e04 commit b6612d7
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*.lo
*.o
*.obj
Game

# Precompiled Headers
*.gch
Expand Down
Binary file removed Game
Binary file not shown.
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
CC=g++
CFLAGS=-c -Wall -std=c++11
LDFLAGS=
CHARACTER=Model/Character/Player.cpp
SOURCES=main.cpp $(CHARACTER) UserInterface.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=Game

all: $(SOURCES) $(EXECUTABLE)

$(EXECUTABLE): $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) -o $@

.cpp.o:
$(CC) $(CFLAGS) $< -o $@
clean:
rm *.o Game
rm ./Model/Character/*.o
Binary file removed Model/Character/test
Binary file not shown.
4 changes: 2 additions & 2 deletions UserInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ int UserInterface::Decision_Prompt(std::string prompt, std::vector<std::string>
// Output the information
std::cout << prompt << std::endl;
// Output and number the choices
for(int i = 0; i < choices.size(); ++i)
for(std::size_t i = 0; i < choices.size(); i++)
{
std::cout << i+1 << ": " << choices[i] << std::endl;
}

int userInput = -1;
unsigned int userInput;
std::string rawInput;
// Repeatedly read input from stdin until a valid option is
// chosen
Expand Down

0 comments on commit b6612d7

Please sign in to comment.