I'm really struggling to come to terms with the idea of how to use GetInt.
You can imagine "GetInt" to be a kind of a mailman that delivers the "Int" (that the user has entered) to you/your code.
Now you have to provide a mailbox/container/variable where the mailman can put the "GetInt"-letter. Otherwise you couldn´t do anything with it.
That means: It is ...
I'm definitely struggling quite a bit - I'm at a loss for where to
start with my Mario project.
I recommend you read the specifications in the specification page carefully and watch Zamyla's walkthroughs. They are often very useful particularly if you are not sure how to start.
I've grasped the concept of the printf function (I ...
When you divided here: image[i][j].rgbtRed = (sumRed / pixCount); you'll problably get a decimal point result. The problem is that working with int variables will result in a truncated result, the decimal point will be erased, no mather if it's ,001 or ,999. you have to think a way to get around it.
Also you have to think that when taking the values from ...
The error is using a float to keep a running track of the change. This is, in fact, the whole point of this exercise.
You should go back and review all of the material related to this pset and all the lecture material related to imprecise storage of floats in a computer.
There are also countless posts in this forum covering the same problem.
Most important question: did you resave the corrected code and remake it before checking it? The IDE does NOT automatically recompile your code.
I don't think it's an issue with the code above. I think it's an issue either with not saving it, not remaking/recompiling it, or you're editing one version and running another version in another directory.
While working with your code, I seemed to notice that i++ would keep going on forever as long as the string was not invalid. This would mean that as it keeps looping and looping, eventually you would try to print values of the array that are invalid, thus leading to your segmentation error.
if (s[i]==' ')
In your maze of if and else if statements, you are calling your oText a lot. As you probably know, this is an array. What do you think will happen when you use (int) array? I mean, you can't make an integer out of an array right? Maybe access a value insiiiide that array?
I hope that helps!
(If it did, make sure to mark this question as answered, I
One of the problems is that you're not resizing vertically. What you're doing is:
1) read one triple and write it as many times as needed by resize factor. Repeat this until a whole scanline has been read and written. (All this is correct)
2)Then you skip the infile's padding.
3) You repeat steps 1 and 2 n amount of times. But each time you start the ...
If I recall correctly, this follows the actual Harvard CS50 calendar in the syllabus. Week 0 is the 1st week of class, so there is no pset to work on. The first pset gets released late on Friday of Week 0, so the students are actively working on pset 0 during Week 1. And so on and so forth.
Most of the times Vmware Player or Virtual Box doesn't work because virtualization features haven't been enabled on your Computer Hardware.
You have to "turn on" this setting on your BIOS setup, a menu that can only be accesed while the computer boots up (usually by pressing DEL key, or some other key specified by your computer).
You have to follow the ...