Skip to main content
6 votes
Accepted

Crack - launching and crypt function

crypt() is an encryption algorithm. It takes a plaintext string (a user password), and encrypts it, so that it can be stored in a file. char *crypt(const char *key, const char *salt) The key ...
robert_x44's user avatar
5 votes
Accepted

Week 1 compiling String.c using clang instead of make

The make utility actually calls the clang compiler with special options that can be set for a project. When I run make in the ide it actually runs the following: clang -fsanitize=integer -fsanitize=...
robert_x44's user avatar
3 votes

error to run all my programs

It looks like you are trying to compile the program (make hello). To run the program the command is usually something like ./hello.
DinoCoderSaurus's user avatar
2 votes
Accepted

Problem Set 1 help, clang hello.c, and ls (list)

Ahh I figured it out! Instead of using ~/pset1/hello/ $ go back to just the directory pset by using change directory ~/pset1/hello/ $ cd ~/pset1/ then add your ls command ~/pset1/ $ ls hello/ ...
Georgia van der Zalm's user avatar
1 vote

clang-7: error: linker command failed with exit code 1 (use -v to see invocation

Try saying make then the name u want ur file to be called ex- make hello in the terminal
iliketurtlz's user avatar
1 vote

CS50.h library in ubuntu

Are you using CS50 ide ? #include <cs50.h> This library will only work if you use CS50 ide for compiling your code, otherwise it will not compile
Shehroz Ali's user avatar
1 vote
Accepted

Says that ./hello is a directory and error code when say clang -0 hello hello.c

Problem with your ./hello not working is that there is no hello program to run. There's a folder called hello in that location not a program. And about error in make CAN YOU SHARE THE ERROR CODE OR ...
Aftab Ansari's user avatar
1 vote

bash: clang: command not found

"after I press Run." This doesn't sound like you are using the CS50 IDE (http://cs50.io). Or, if you are, you may not have created it using the CS50 template. If you think that's the case, here ...
curiouskiwi's user avatar
  • 18.7k
1 vote
Accepted

In pset2, Vigenere, I made and used an array that I would like for it to be explained

The detail you seem to miss is that a char array is not a string unless it ends in the NUL char '\0' If you have char text[] = "Foobar";, that is stored {'F', 'o', 'o', 'b', 'a', 'r', '\0'} ...
curiouskiwi's user avatar
  • 18.7k
1 vote
Accepted

recover.c:43:34: error: use of undeclared identifier 'out' fwrite(temp, 1, 512, out);: WHAT?

The variable out is a local variable and in C the local variables are block scoped and hence the variable out in this case only exists within the block; { sprintf(fname, "%03i.jpg", fileCount); ...
Ashen Gunaratne's user avatar
1 vote
Accepted

pset1, Cash, having problem in a single test case 4.2

When you write d -= 0.01; do you mean d -= 1; ? Also, consider rounding after multiplication with 100. Decimal numbers like 4.2 might seem easy to write as a decimal number, but in binary that's ...
Blauelf's user avatar
  • 21k
1 vote
Accepted

Clang error with compiling code

I found out my problem. After a closer look at the Makefile, I realized that I only needed to type "make" into the terminal to compile all programs in speller, not make dictionary as I was doing.
Jason_V's user avatar
  • 182
1 vote
Accepted

Pset5 speller - load clang error (linker command error) and multiple definition

True, the function is defined once in dictionary.h. However, the compiler sees that definition twice, the first time when it encounters #include "dictionary.h" in speller (notice the reference to ...
DinoCoderSaurus's user avatar
1 vote
Accepted

Setting up clang on ubuntu pc

The C libraries used by CS50 are all included in a default installation (std*.h, string.h, ctype.h and so on), except cs50.h of course, which you can find instructions on how to use and download and ...
kluvin's user avatar
  • 1,223

Only top scored, non community-wiki answers of a minimum length are eligible