Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search Coderanch
Advance search
Google search
Register / Login
Ejay Smith
Greenhorn
+ Follow
news
3
Posts
1
Threads
since Jun 27, 2017
Merit badge:
grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads
Recent posts by Ejay Smith
c++ errors
+John Joe @John Joe
Wow, all I had to do was add a void for ExploreA!
Thank John Joe, much appreciated!
show more
7 years ago
C / C++
c++ errors
Hi John Joe, here are the errors: make all
Building target: textadventure Invoking: MacOS X C++ Linker g++ -o "textadventure" ./src/textadventure.o Undefined symbols for architecture x86_64: "ExploreA()", referenced from: AnakinN() in textadventure.o AnakinN1() in textadventure.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [textadventure] Error 1
(my game is called textadventure btw)
show more
7 years ago
C / C++
c++ errors
Hello, I have two errors in my code. I don't know why I have them. Will someone please help me? Here's my code:
#include <iostream> #include <cctype> #include <cstdlib> #include <unistd.h> using namespace std; int Hp; int HpMax; int Atk; int Def; //There's a first for everything void Welcome(); void Start(); void TownSquareFirst(); void MeetAnakin(); //The basic stuff void Stats(); void StatsH(); void Sleep(); void Home(); void GameOver(); void ExploreA(); void TownSquare(); void TalkAnakinN(); void AnakinN(); void AnakinN1(); bool anakin; char Name[25]; int hp; int Maxhp; int def; int Maxdef; int money; int GameState; int iRoomCounter[4] = {0,0,0}; int AnakinFriendlinessCounter; string choice; void TalkAnakinN() { system("cls"); cout << "\nYou walk to Anakin's house and knocks on the door. 'Back so soon?' He asks. He invites you in." << endl; AnakinN(); return; } void AnakinN() { cout << "\n'What's up?'" << endl; cout << "Choices:" << endl; cout << "'Please tell me about Nimbus Town' (About)" << endl; cout << "'Could I explore your house?' (House)" << endl; cout << "'Why are all the people acting weird to me?' (People)" << endl; cout << "'What's at the edge of town?' (Edge)" << endl; cout << "'I feel like you are the only realistic person in this town.'" << endl; cin >> choice; if(choice == "About" || choice == "about") { cout << "\n'Nimbus Town has been around for almost 25 years." << endl; cout << "It's a friendly place. Everyone likes each other and there's never any conflict. They never" << endl; cout << "want to leave," << endl; cout << "'But between you and me, I think there's something going on that is much bigger than we expect.'" << endl; AnakinN1(); } if(choice == "House" || "house") { cout << "/n'Feel free to explore.'" << endl; ExploreA(); } if (choice == "People" || choice == "people") { cout << "/n'Ah yes, the people. They come from all over the United Isles." << endl; cout << "They're very nice, too. They give me gifts all the time." << endl; AnakinN1(); } if (choice == "Edge" || choice == "edge") { cout << "'What are you talking about? There isn't anything around this town. Just infinite wastelands...'" << endl; AnakinN1(); } } void AnakinN1() { cout << "\n'What's up?'" << endl; cout << "Choices:" << endl; cout << "'Please tell me about Nimbus Town' (About)" << endl; cout << "'Could I explore your house?' (House)" << endl; cout << "'Why are all the people acting weird to me?' (People)" << endl; cout << "'What's at the edge of town?' (Edge)" << endl; cout << "'I feel like you are the only realistic person in this town.'" << endl; cin >> choice; if(choice == "About" || choice == "about") { cout << "\n'Nimbus Town has been around for almost 25 years." << endl; cout << "It's a friendly place. Everyone likes each other and there's never any conflict. They never" << endl; cout << "want to leave," << endl; cout << "'But between you and me, I think there's something going on that is much bigger than we expect.'" << endl; AnakinN1(); } if(choice == "House" || "house") { cout << "/n'Feel free to explore.'" << endl; ExploreA(); } if (choice == "People" || choice == "people") { cout << "/n'Ah yes, the people. They come from all over the United Isles." << endl; cout << "They're very nice, too. They give me gifts all the time." << endl; AnakinN1(); } if (choice == "Edge" || choice == "edge") { cout << "'What are you talking about? There isn't anything around this town. Just infinite wastelands...'" << endl; AnakinN1(); } }
show more
7 years ago
C / C++