Questions tagged [cs50.h]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
59 views

UNABLE TO INSTALL CS50 LIBRARY FOR C FOR USE ON VIM

I downloaded cs50 library for C per the instructions on cs50 docs site. I then unzip it and run sudo make install but it display the error below: No superuser binary detected. Are you rooted? I'm ...
2
votes
1answer
304 views

Compiler Can't locate CS50 library locally

I'm trying to work on my C psets on my local machine in vscode. I've installed the cs50 library locally but am having trouble compiling. OS is osx 10.14.3 The error I'm receiving when compiling with ...
0
votes
1answer
56 views

Help in Resize, biSize headers not sizing correctly

#include <stdio.h> #include <cs50.h> #include <stdlib.h> #include <math.h> #include "bmp.h" int main(int argc, char *argv[]) { // ensure proper usage if (argc != 4) ...
0
votes
1answer
210 views

Compilation error in hello.c: undefined reference to `get_string'

I'm getting the following error after running make hello. I downloaded the latest version of libcs50from the GitHub releases page and installed using sudo make install. I'm running the program on ...
1
vote
2answers
108 views

cannot find cs50.h within the cs50 ide

getting error message from CS50 ide 'You seem to have an error in hello.c on line 6. By "implicit declaration of function 'getstring'", clang means that it doesn't recognize getstring. Did you forget ...
0
votes
1answer
118 views

Problem with credit.c

I have a problem with credit.c. The program works when the user enter a numeric input but when someone enters a string, i don't know how to make that the program print "Number: " again. Instead of it ...
0
votes
0answers
367 views

'cs50.h' file not found [Mac]

I have installed cs50.h to my usr/local/include folder and libcs50.a to the usr/local/include folder however neither clang nor gcc are able to find it, giving the error: hello.c:2:10: fatal error: '...
0
votes
1answer
423 views

Functions outside Cs50.h

I am just wondering, so far in the psets, we have been working closely with cs50.h library. In real life though, there won't be much use for the cs50.h library, so my question is: What is the ...
0
votes
1answer
415 views

CS50 IDE cs50.h library problem 2017

I seem to be having a problem accessing the cs50.h library. I've run update50 and, as of this writing, I appear to be running version 98. I have typed in exactly what was shown on a part of the ...
1
vote
2answers
162 views

CS50 IDE seems to use an old version of the CS50 library

I've been following the lessons fine, and when I got to the point in Week 1 where he tells you to sign up for the CS50 IDE, I did so. But even when duplicating the exact code from the first example: #...
0
votes
1answer
250 views

Why is GetString() defined at the end of cs50.c

I'm checking out the source code for cs50.c and found out that all the functions, e.g. GetChar or GetInt, require GetString(), but GetString() is defined at the end of cs50.c. When programming in C, ...
0
votes
1answer
72 views

GetInt + sscanf — why doesn't it accept only characters?

Going through the Week 5 walkthroughs and there's an interesting line of code in getint to make sure the user has only typed an int: if (sscanf(line, " %i %c", &n, &c) == 1) { // continue} ...
0
votes
1answer
175 views

Unexpected errors while assigning variables

I just began taking the CS50x course, and while tweaking the programs used on the lectures I came accross a very unpleasant obstacle. I followed the exact same steps and recreated the exact same ...
0
votes
1answer
538 views

String error #include <cs50.h>

I am getting: error: unknown type name 'string'; did you mean 'string'? string name = "Seth"; I am using VMware with the cs50 appliance, I ran update50. I've tried running it in both gedit ...
0
votes
0answers
162 views

Installing cs50.h in my appliance50

I followed Ubuntu steps and I finished this: apt-get install gcc wget http://mirror.cs50.net/library50/c/library50-c-5.zip unzip library50-c-5.zip rm -f library50-c-5.zip cd library50-c-5 gcc -c -...
2
votes
1answer
833 views

cs50.h header files download

Is there a way (and is it allowed) to download the CS50.h file(s) and add them to a local (home) compiler/development setup? I usually vet my programs in Eclipse on Windows 8 but can't build anything ...
0
votes
2answers
161 views

CS50.h Error when compiling

So I just started this CS50 class, I'm on week one on the HELLO-1 walk through. I'm having a little trouble with the file cs50.h I keep getting this error when I try to compile it. Here is the code I ...
0
votes
1answer
609 views

“string” data type in cs50 library

The data type string in cs50.h is of size 4 bytes. Then how come it can take a string of size > 4. Is that data type extendable ( does it extend in size according to the string we pass on to it) and ...
0
votes
1answer
117 views

problem with CS50.h and update50

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 ...
0
votes
1answer
531 views

How can i add cs50 library to eclipse IDE?

I want to add cs50 libraries to eclipse IDE. I searched in google but i couldn't find a solution. Plz help me to add these libraries. I use eclipse luna.
0
votes
2answers
148 views

Error using string as a data type while including the cs50 library

I am receiving the following error while compiling my code: jharvard@appliance (~/Dropbox/pset2): make initials clang -ggdb3 -O0 -std=c99 -Wall -Werror initials.c -lcs50 -lm -o initials initials....
0
votes
0answers
567 views

How do I use cs50.h in Xcode?

I am not enrolled, so I don't have access to the cs50 appliance. I have followed the instructions for installing the files for a mac. I've read numerous threads for the issue, and tried to implement ...
0
votes
1answer
212 views

automatically link cs50 when using make? - not using appliance

On Ubuntu 14.10, how to automatically link cs50.h when using make, without needing to link it manually like with GCC. I need to make cs50 link automatically when I call make on my c file. When I use ...
1
vote
1answer
134 views

unable to access functions in cs50.h [duplicate]

Unable to access any function in cs50.h like GetInt(); or GetString(); Gives an error- undefined reference to GetInt.. And i'm using #include and also tried #include"cs50.h" And i don't think the ...
0
votes
3answers
703 views

Problem with cs50.h header file!

In pset1 for the mario program,when I compile my code including cs50.h header file in my code it throws up the following error However,when I don't include the cs50.h file and use scanf function ...
3
votes
2answers
4k views

Installing cs50.h on a Mac

I am currently taking CS50 online via edX. I would like to install the CS50 Library. I followed these instructions for installing on a Mac and everything seemed to work out fine. However, anytime I ...
1
vote
1answer
1k views

Problem including cs50.h with Visual Studio 2013

I use the cs50 app and VS2013. Of course, all is well with the cs50 app (since it is designed to be) but when I use VS2013 to code, any functions I use from cs50.h produce an error that looks like ...
1
vote
1answer
1k views

Installing cs50.h

I'm trying to install the cs50 library on my mac, and I found and followed the instructions here. All the terminal commands appear to execute without error. I also confirmed that the directories it ...
6
votes
8answers
8k views

Undefined reference to `GetString'

I'm having the following error myName.c:(.text+0x18): undefined reference to `GetString' It seems that something is wrong with the cs50 library. What is this file suppose to contain? In my case it ...