Skip to main content

Questions tagged [file]

The tag has no usage guidance.

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

make:***No rule to make target 'hello'. Stop. This really getting me down

My terminal wont process even a simple hello world program. I thought I had it sorted yesterday it ran fine now I am trying to run a simple code and this message has re entered my screen make:***No ...
UP timism1's user avatar
0 votes
0 answers
12 views

Is there a way to open external files from your desktop in CS50 VSC?

I try to find the option to upload the files from my local drive to CS50 online VSC, but not able to find the option. I have been copying the codes by hand. OR is there a terminal comments for that? I ...
TrytoLearn's user avatar
0 votes
1 answer
385 views

How do I delete files?

I am brand new at this and I have written some programs which I can't run. It says no such file or directory. But I can see the file/directory right in front of me. How do I delete all this stuff and ...
Nancy Mills's user avatar
0 votes
1 answer
33 views

Directory structures

I'm trying to create a new directory inside my pset1 directory. When I execute "~/ $ mkdir ~/pset1/mario" I get "bash: /home/ubuntu/: Is a directory". I think I need a better ...
stuttard's user avatar
0 votes
1 answer
222 views

Terminal window not update

Struggling after Certain changes were made on the file and compiled as compiler failed to identify the changes made.I.e the terminal window displays the same errors in the file. This meant program ...
Mahesh B's user avatar
0 votes
1 answer
140 views

MY code works with a hardcoded string, but not a string object

I'm working on pset6 2020 dna. I'm having trouble inputting the sequence file to be compared into my search function. If I just open the file and copy paste the sequence into the code as a string, it ...
Renée's user avatar
  • 19
0 votes
1 answer
23 views

Querry regarding maintainence and usage of files in c

So, csv files are used to store data and so does .txt files. I just want to know how do we manage a large text file. For example, if i have a file which contains all the info about school students, ...
Musical_Ant's user avatar
0 votes
1 answer
18 views

writting a function to display a file

in the week 4 shorts, it was told how we can write cat command from linux in c: i Wrote the following code: #include <stdio.h> include void Print_File(FILE *f) { char s = fgetc(f); while (s ...
Musical_Ant's user avatar
0 votes
1 answer
707 views

What does a pointer to a file really represent?

I have a question regarding file pointers (i.e FILE *). I am having a hard time understanding conceptually what this represents in terms of its memory. When the concept of files was introduced in ...
Bilal Junaidy's user avatar
1 vote
0 answers
63 views

CS50, pset2, crack, suggested dictionary file

I am taking cs50 on edx and I am currently on pset2, crack. I want to find a dictionary file that has a fair (maybe over 50,000?) amount of words in it to encrypt and compare them with the hashed ...
Elena Kalema's user avatar
0 votes
1 answer
52 views

Code not working when saved inside bigger files

Hello, I am following along in week 1's second lecture, specifically trying to code capitalize0.c. Previously, all my coding files (cash, cash.c, hello, etc) were aligned with my bigger files, psest1 ...
tsinelnikova's user avatar
0 votes
1 answer
164 views

cs50 - I can not clear check pset1 Mario less cause "...required files...". I'm in the right directory.

The check50 is returning I have not created the file, which I see has been a problem others experienced, but all the solutions offered are to get into the correct directory. I am in the correct ...
CPBarry's user avatar
0 votes
1 answer
69 views

Files Won't Open In The Directory

Hey so I have written some code, needless to say I am a bit confused, I have pasted it below. It is for pset4 recover and so I want to open the files that are contained in card.raw, however despite ...
stabilo's user avatar
0 votes
1 answer
173 views

Detecting if we already found a jpg

I'm having trouble figuring out how to print extra 512bytes, if the first jpg is longer than that, like how to loop UNTIL it hits the next 4 header indicators. In this code example I've tried with a ...
Jake's user avatar
  • 34
0 votes
1 answer
207 views

[PSET4][Recover] Why does FILE* img work but not FILE *img?

A little background first: I really enjoyed figuring out recover.c. After finishing the successfully once, I wanted to cement the concepts in my head, so I rewrote it from scratch as best I could, ...
Dylan St. John's user avatar
0 votes
1 answer
844 views

How Do I Create A File

I am attempting pset1. Let me quote the first line of instructions: "Shall we have you write your first program? Inside of your pset1 folder, create a new file called hello.c, and then open that file ...
user14775's user avatar
0 votes
1 answer
34 views

Ports and Files

In Week 6 lectures where we first learn about computer networks, we learnt about ports. David said that the ports tell the listening computer what type of file it is, e.g. port 80 for HTTP, 25 for ...
Adrian Muljadi's user avatar
0 votes
0 answers
239 views

crack.c brute force - optimization needed!

I have written a recursive algorithm that should break the encryption, although to do so, it creates a file for each possible size of a string (8 is max). After it depletes the 1 size combos, it ...
MaxG's user avatar
  • 101
1 vote
1 answer
969 views

how to read integers (separated with spaces) from a file line-wise?

I have a file filled with integers and these integers are separated with spaces and a new line. This means that there are a bunch of integers per line. I want to read each line of integers and store ...
Gautam Sharma's user avatar
1 vote
1 answer
75 views

problem mounting john harvard's home directory

I type in \\w.x.y.z\jharvard into address box on top of folder (where w.x.y.z is the IP address of the appliance - not literally w x y z but with the numbers in IP address at bottom right of the ...
David Beede's user avatar
0 votes
0 answers
127 views

how to pass arguments to copy file program?

i am learning on study50 regarding file io. the exercise asks us to write a program to copy a file. I have written the code correctly for this program. I have named this cp.c and usage cp source ...
Hoshiyar Singh Digari's user avatar
0 votes
1 answer
121 views

edx pset 3 file not found

Is it too late to do pset 3 now? Below message seems suggest the file is no longer available.. Thanks~ jharvard@appliance (~): ~/Dropbox bash: /home/jharvard/Dropbox: Is a directory jharvard@...
Hang Man's user avatar
3 votes
2 answers
674 views

Where are cs50.c / cs50.h?

I've seen in week 5, David opened up the cs50.c and cs50.h files. I'd want to further look into that myself but can't found it anywhere in my appliance. Where are cs50.c and cs50.h?
RexYuan's user avatar
  • 309
0 votes
1 answer
358 views

pset 5 Recover check if file open

How do I check if I already opened a jpeg file to write to? I could declare an int outside of the loop that I set to 1 if I open a file, but I think there must be another way... Some kind of function ...
Jesse's user avatar
  • 157