Trial and errors

It's my first time using C++, please bear with me:)
I keep getting an error which means something is wrong or a symbol is missing and I can't seem to figure out where I messed up? Its coming up with "collect2: error: ld returned 1 exit status"

Honestly I just need the thing to run so I can paint it on my door in real life. With a good conscience. I know, I'm weird.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
  #include <iostream>
#include <string>
using namespace std;

void manageType (string userType) {
  // Manage type response.

 if (userType == "1") {
   cout << "Welcome home, Honey!" << endl;
 } else if (userType == "<2>") { // 
   cout << "<Please insert cash or select credit card type." << endl;
 } else if (userType == "<3>") { // 
   cout << "<Sup?" << endl;
 } else if (userType == "<4>") { // 
   cout << "<Good luck, we're broke! By the way, the people next door have way better stuff." << endl;
 } else if (userType == "<5>") { // 
   cout << "<Yay! Glad you're here!" << endl;
 } else if (userType == "<6>") { // 
   cout << "<Look, I don't come to your door trying to sell you weed and talking about sex, do I?" << endl;
 } else {
   cout << "Wrong answer! GET LOST or, for you binary folk, 01100110 01110101 01100011 01101011 00100000 01101111 01100110 01100110" << endl;
 }

 return;
}

void humanType () {
  // Resolve humanType.
  string type;

  cout << "Please enter the number that best corresponds with your identity or purpose." << endl;
  cout << "1 Spouse,   2 Parent,   3 Friend,   4 Robber,   5 Delivery Guy,   6 Jehovas Witnesses" << endl; } // 
One thing, unless it just hasn't been copied and pasted here, you're missing a main() function. The main function is the entry point for a c++ program and is required.

There also doesn't seem to be an input (cin) for the type.

Are they just going to be entering a number? In some of the type comparisons you have <> around the value you're comparing - should that just be the number?
Also - if a function is going to return a value, it can't be void. If it is void, there is no return statement.
Topic archived. No new replies allowed.