0

In pset1 for the mario program,when I compile my code including cs50.h header file in my code it throws up the following errorenter image description here

However,when I don't include the cs50.h file and use scanf function instead,it works perfectly fine except for character inputs.

I think the header file is not present in the library.How do I overcome this problem?

Also,instead of the clang compiler appearing after make command,it shows cc? What exactly does this mean?

6
  • Are you using the Appliance? If so, have you tried the update50 command prior to running make? – Calculemus Jan 3 '15 at 19:48
  • yes,I am using the appliance....i tried the update50 command....the terminal gives error message--update:command not found.. – Subhaprada Chand Jan 4 '15 at 19:18
  • Sorry to belabor this, but have you tried update50 or update? I'm asking because the error message you posted, update: command not found suggests you tried the latter instead of the former. Be sure not to leave a space between the letters and the numbers when typing out the command. – Calculemus Jan 4 '15 at 19:32
  • A suggestion, I believe it is an issue with the gedit - try re compiling it via the linux terminal - I have seen these things missing in stuff I compiled after installing the new vm & appliance – Stuart Richards Jan 5 '15 at 12:07
  • I've been having the same issue so I thought it was the header file also. My appliance is updated but I get an error when trying to compile with gedit. It compiles with no errors if I use terminal. Not sure why. – user4551 Jan 8 '15 at 2:10
1

I solved the cs50.h problem by updating my appliance. For updating open the terminal in the appliance and type--

update50

After the process is completed, cs50.h will work..

1
  • how long it takes for update50 to complete? is the 2 GB appliance whole being updated in this process? is there no any way to use CS50.h in the CS50 appliance without update50? p.s. I am using CS50 appliance in windows 7 – Shekhar Jun 21 '15 at 8:48
0

Getting the same error. I think the header file is not include or something. Try using scanf function to store values in a variable, which is predefined in stdio.h header file. SYNTAX--

scanf("%d",&a);

This will store an integer input from user to the address of integer variable a. Or just think of it as equivalent to (a=GetInt();)

0

hmm, you have changed your default make rules.

try to update your appliance, if it doesn't solve your problem, then pray to God xP

No seriously, I was watching for how to set the default rules, I couldn't find some useful, or at least, easy to understand and/or to do.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .