Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

tdabboud

  • 4 years ago

need help debugging one spot in C code

  • This Question is Closed
  1. tdabboud
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    This is all the code, I am having trouble with the lines that look like this: if(salary[i] >= 6.0 && position[i]=='QB') I do not know how to symbolize the QB. The file I am reading from looks like this: 4795 QB Flacco Joe 12 3 300 7653 RB McCoy LeSean 2.8 5 70

    1 Attachment
  2. Narsat
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 2

    Use strcmp to compare two strings: http://www.thinkage.ca/english/gcos/expl/c/lib/strcmp.html

  3. rsmith6559
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    C is particular about quoting. Single quotes are for characters, single characters. Multiple characters use double quotes.

  4. 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