Questions tagged [invalid]

The tag has no usage guidance.

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

Invalid vote while testing Tideman problem

am working on Tideman.c problem. When I go to test the code by doing the following: -cd Tideman.c -clang tideman.c -lcs50 -./tideman Alice Bob Charlie -Number of voters: 3 -Rank 1: Alice "Invalid ...
  • 1
0 votes
0 answers
17 views

Why do I get "invalid operands to binary expression('std::ifstream')" error?

#include #include #include #include #include using namespace std; //declare functions void adding(); void viewing(); void deleting(); void updating(); void searching(); void summary(); int main() ...
0 votes
1 answer
571 views

Valgrind invalid write and read

I recently made the speller excercise and it is working, has no memory leaks but I am getting some Invalid read and Invalid write errors from Valgrind in my check function. First I got a error because ...
  • 1
0 votes
1 answer
104 views

Recover code makes 000.jpg to 049.jpg, but jpgs are corrupt

I've been working on this problem for a little bit, but right now I have no clue why my code isn't working. Right now it spits out the 50 jpgs like it's supposed to, but they're all blank. Anyone have ...
  • 3
0 votes
1 answer
81 views

Pset3 Plurality returning "Invalid vote" in main programme code

When inputting vote names in "Plurality", the programme is returning Invalid vote. It looks like this in the terminal: ./plurality Alice Bob Garry Jim Number of votes: 4 Vote: Alice Invalid ...
0 votes
1 answer
21 views

Prints " Invalid vote " for " code 1 " as vote function But works fine for " code 2 " as vote function. Whats wrong with " code 1 "?

// CODE 1 :- bool vote(string name) { // TODO for (int i = 0; i < candidate_count; i++) { if ( candidates[i].name == name ) { candidates[i].votes = candidates[i].votes + 1 ; return true ; } } ...
0 votes
1 answer
548 views

pset2 - Cipher - Invalid Slug

I'm struggling to check50/submit50 for the caeser cipher wk2 pset for CS50. Can anyone please advise what mistake I'm making? Code as linked: https://pastebin.com/5B7tcaGg I'm attempting to use; ...
  • 1
0 votes
1 answer
72 views

PSET 4 RECOVER - My program outputs 50 images however they all have an invalid format

So I think I've nearly finished but I've come upon a bit of roadblock. That is all my photo are invalid. I looked at all the threads I could and couldn't find out why. My Code: #include <stdio.h&...
  • 11
0 votes
2 answers
4k views

i am unable to submit my work in pset1 of marioless. It shows me a comment in yellow which says invalid slug.What should I do?

~/workspace/ $ submit50 cs50/2018/x/marioless Connecting.... Invalid slug. Did you mean to submit something else? ~/workspace/ $ submit50 cs50/2018/x/marioless Connecting..... Invalid slug. Did you ...
1 vote
1 answer
127 views

Resize Invalid Image Format

For the past couple of days, I have been struggling with Resize (less comfortable). I have looked at similar questions and I've been able to fix some problems yet my largest one remains the same: my ...
  • 157
0 votes
1 answer
486 views

check50 not working 2017 for initials

I copied check50 cs50/2017/x/initials/less like shown on pset2 and i get the "Checking. invalid ID" error. I added initials.c at the end and nothing.
0 votes
1 answer
307 views

Pset6 credit.py always outputs INVALID

I'm currently re-implementing every one of my projects that could be bettered before I submit them all. Right now, I'm stuck on my re-implementation of pset6 credit. For some reason, it always outputs ...
  • 182
0 votes
2 answers
1k views

how to use check50 on mario pset1?

What's the correct ID to use check50 for mario on pset1 guys? I get "invalid ID" on every check50 ID I use. I thought "check50 2016.mario mario.c" was the one to check, but seems not. Any help? ...
  • 3
0 votes
3 answers
3k views

python invalid syntax end=""

The first print line I use , end="" in has a red dot next to it and is marked as invalid syntax. The python code still works with no problems but the invalid syntax is always there. I even copied ...
  • 41
1 vote
1 answer
2k views

how to check with check50 for 2017 users

I tried this code check50 2017/x/pset1/hello/hello.c but its showing Checking. invalid ID I was expecting the mistakes in my code https://ide.cs50.io/rahulatrkm/ide50#openfile-x link to my file which ...
  • 264
1 vote
1 answer
143 views

pset 4 - recover -> invalid pointer

i am trying to solve the recover issue. When I run my programm I get: * Error in `./recover': free(): invalid pointer: 0x0000000001da5200 * Aborted I don't know how to proceed. Can someone please ...
0 votes
1 answer
52 views

pset4 resize invalid or unsupported image

I have a few problems with my code but my main problem right now is being unable to even open the resized image. I think the problem is with writing updated header info to the outfile. I've thrown in ...
  • 5
1 vote
1 answer
116 views

I am working on the quotes' section of the pset7. I always get this error which I am unable to understand?

quote.php <?php // configuration require("../includes/config.php"); if ($_SERVER["REQUEST_METHOD"] == "GET") { //do something // else render form render(".....
0 votes
0 answers
104 views

I am getting stuck on quotes.php. I am getting this invalid message?

quotes.php <?php // configuration require("../includes/config.php"); if ($_SERVER["REQUEST_METHOD"] == "GET") { //do something // else render form render("...
0 votes
2 answers
312 views

Invalid read/write errors in pset5

I have been trying to create a trie for storing my dictionary, and the code looks like it ought to work. However, when I run Valgrind on it, I get a number of read/write errors (mostly of size 4). In ...
0 votes
1 answer
1k views

error: invalid operands to binary expression ('int *' and 'LONG' (aka 'int'))

I'm pretty sure I'm using pointers incorrectly but I don't fully understand why using them in this way is wrong. The compiler seems to throwing out an error on the line (near the bottom of the code) ...
  • 3
0 votes
1 answer
1k views

How to check if input is invalid with C

I am doing greedy, and I want to write a code which says that if the input is not a number, I say something other than it is a number. I know that it is not required, but I just want to know if there ...
0 votes
1 answer
168 views

Pset 1; Greedy; probably quite a lot wrong with my code

Well, I've been working on this for an embarrassing amount of time and just can't work out the kinks. After days of research and re-watching videos, scouring through my notes and reddit, I think I've ...