Questions tagged [cs50.h]

The tag has no usage guidance.

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

cs50.h: No such file or directory

I am coding at online vscode(connect with gitHub). I am trying CS50 Lab1 and I followed the steps but the error appeared. I've searched the answer but most of them are aim at local surroundings not ...
zhacinkg's user avatar
0 votes
1 answer
141 views

Error when I try to use get_int

I have included cs50.h library, and I've ran the program after substituting a number in place of the get_int function and the program works completely fine, so something is wrong with using the ...
jay's user avatar
  • 1
0 votes
1 answer
880 views

Unable To Install CS50 Library for C on Android Termux

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 ...
KeleosWilliam's user avatar
2 votes
2 answers
708 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 ...
M Wexler's user avatar
0 votes
1 answer
66 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) ...
Zelo Avarosa's user avatar
0 votes
1 answer
1k 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 ...
Aadil Ayub's user avatar
2 votes
2 answers
177 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 ...
Christophe spencer 's user avatar
0 votes
1 answer
128 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 ...
Juan Pablo Acosta Benavides's user avatar
0 votes
0 answers
2k 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: '...
Robert Woods's user avatar
0 votes
1 answer
789 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 ...
Ha Tran's user avatar
  • 74
0 votes
1 answer
484 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 ...
Matt's user avatar
  • 3
1 vote
2 answers
191 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: #...
pixlark's user avatar
  • 13
0 votes
1 answer
329 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, ...
Nahua Kang's user avatar
0 votes
1 answer
84 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} ...
borker's user avatar
  • 301
0 votes
1 answer
222 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 ...
Matheus Fonseca's user avatar
0 votes
1 answer
810 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 ...
RicochetRiot's user avatar
0 votes
0 answers
190 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 -...
Hongrui Duan's user avatar
3 votes
1 answer
965 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 ...
Gary Ridley's user avatar
0 votes
2 answers
217 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 ...
Denis Ponkratov's user avatar
0 votes
1 answer
714 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 ...
Gautam Sharma's user avatar
0 votes
1 answer
119 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 ...
Shekhar's user avatar
  • 113
1 vote
1 answer
674 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.
naval gupta's user avatar
0 votes
2 answers
160 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....
UnderDogRPL's user avatar
0 votes
0 answers
694 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 ...
Frankiii's user avatar
0 votes
1 answer
319 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 ...
Anjan's user avatar
  • 113
1 vote
1 answer
173 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 ...
Prateek Pande's user avatar
0 votes
3 answers
943 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 ...
Subhaprada Chand's user avatar
7 votes
3 answers
7k 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 ...
Karla Quintero's user avatar
1 vote
1 answer
2k 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 ...
jyj's user avatar
  • 11
1 vote
1 answer
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 ...
anthonygiuliano's user avatar
5 votes
8 answers
15k 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 ...
Kirill Kovalevskiy's user avatar