Questions tagged [scrabble]
The scrabble tag has no usage guidance.
12
questions
0
votes
2
answers
20
views
psets2/scrabble.c, In pset2, scrabble im running into an error incompatible comparison between type int and char
How does [POINTS[word[i]] work, I don't seem to get it, somehow I got it to work, but many times it is showing incompatible comparison between type int and char.
0
votes
1
answer
27
views
Lab 2 i need help to solve
I need to use think pair share to understand the code. we can open zoom to discuss the problem if anyone want to join?
0
votes
1
answer
47
views
I've been stuck on lab 2 Scrabble for a week now and can't seem to figure out where I've gone wrong as it shows error messages and doesn,t compile
#include <ctype.h>
#include <cs50.h>
#include <stdio.h>
#include <string.h>
// Points assigned to each letter of the alphabet
int POINTS[] = {1, 3, 3, 2, 1, 4, 2, 4, 1, 8, 5, ...
0
votes
1
answer
75
views
Please help with Scrabble trouble shooting
I am very stuck with scrabble.
I seem to have the everything working correctly EXCEPT when the words contain the letters 'a','b' or 'c'.
I will post a simplified snippet of the code below and just the ...
0
votes
1
answer
458
views
Week 2 Lab Scrabble
I am working on the scrabble lab and I am unsure of where I have gone wrong in my code.
#include <ctype.h>
#include <cs50.h>
#include <stdio.h>
#include <string.h>
// Points ...
0
votes
1
answer
152
views
Lab 2 Compute Score
So, I am trying to convert every letter of the word to lowercase but it isn't working.
Here is my code:
int compute_score(string word)
{
// TODO: Compute and return score for string
for (int i ...
0
votes
1
answer
58
views
Scrabble doesn't handle numbers
My scrabble program gets broken when I put numbers into it.
#include <ctype.h>
#include <cs50.h>
#include <stdio.h>
#include <string.h>
// Points assigned to each letter of ...
0
votes
1
answer
80
views
can someone translate this to human?
scrabble.c:64:1: error: non-void function does not return a value in all control paths [-Werror,-Wreturn-type]
}
^
1 error generated.
make: *** [<builtin>: scrabble] Error 1
its for this guy(...
0
votes
1
answer
16
views
if i initialize my variable the command line thinks i want a pointer. how do i declare without having to initalize?
rather than just letting me declare a variable the command line is telling me i need to initialize it, but setting it to 0 gives me a segmentation fault. at any rate i dont want a pointer. i want an ...
0
votes
1
answer
56
views
why is my terminal asking me for syntax that I know is wrong?
scrabble.c:38:31: error: expected ';' after top level declarator
int compute_score(string word)
^
;
scrabble.c:41:5: error: expected ...
0
votes
1
answer
571
views
Lab 2 Double free or corruption error
I am working on scrabble.c for Lab 2 and was able to compile and run the code but for some of the words, there is this error:
double free or corruption (out)
Aborted (core dumped)
I tried to google ...
0
votes
1
answer
140
views
Input Problem Getting wrong char LAB2
QUESTION
When i am giving an input as only ? and only ! ===> everything is normal result is equals to TIE
Player1 : ? ---- Player2 : !
but when i give like Question? and Question! (? and !) ===&...