All Questions
3 questions
0
votes
2
answers
8k
views
Split a sentence ito an array of words without using strtok
I need to split a sentence contained in a char pointer into an array of words. I've tried several methods (as I cannot use strtok. The following method I used extracts the different words, but it ...
0
votes
1
answer
310
views
Parse Function: Extra characters in string after using memcpy
My parse function works for the root directory, but for subsequent requests for, say, cat.jpg, the memcpy function seems to copy an extra \220 into both requesttarget and HTTPversion (so, for instance,...
0
votes
1
answer
93
views
Parse function not returning error codes
My code compiles, but the cs50 says it's returning 0 when it should be returning error codes. The premise of my function is to break the line into method, request-target, and HTTPversion and then ...