Thread: yay errors!

  1. #1
    Registered User
    Join Date
    May 2017
    Posts
    1

    yay errors!

    I'm just starting with C++, please bear with me here
    I keep getting this error message and I can't seem to figure out what's missing... 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.

    Code:
      
    #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; } //

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,662
    There's more text with that error message you posted.

    Also, where is your main() function?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can anyone help me with these errors?
    By nullifyed in forum C Programming
    Replies: 7
    Last Post: 05-30-2010, 07:52 AM
  2. two errors, help!
    By j.vick in forum C Programming
    Replies: 6
    Last Post: 03-28-2010, 12:41 AM
  3. HELP with DX9 Errors!!!
    By Tommaso in forum Game Programming
    Replies: 7
    Last Post: 06-28-2006, 02:51 PM
  4. Some other errors for u :)
    By TheDarKinG in forum C++ Programming
    Replies: 2
    Last Post: 07-30-2002, 08:11 PM
  5. errors.. errrors.. more errors
    By Klinerr1 in forum C++ Programming
    Replies: 17
    Last Post: 07-23-2002, 08:43 PM

Tags for this Thread