A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

Curry

  • one year ago

help with c code, it doesn't run. it says ld returned 1 exit status. How do i compile this?

  • This Question is Closed
  1. Curry
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    i have a header file with void printChange(int change); too. so i can't see what's the problem

  2. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    You need a main function.

  3. Curry
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    wait it says to replace the main function though.

  4. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    But without a main function, the program will not work

  5. anonymous
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    You can have the main function call the other function. That will make it run

  6. Curry
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    so here is my main_change class.

    1 Attachment
  7. Curry
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    now i compiled main_change, but it says undefined reference to printchange

  8. Curry
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    wait it works now, thanks!

  9. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.