Questions tagged [isdigit]

The tag has no usage guidance.

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

Segmentation error Caesar using isdigit

Getting this segmentation error for inproper use of isdigit in my If statement, i just don't know how else to check argv[1] for numerical value as opposed to alphabetical. int main(int argc, string ...
0
votes
1answer
13 views

pset2 (ceasar) - isdigit function not working correctly returns “expected expression” error

I don't know why I am getting an error on my isdigit() function, it seems correct to me. #include <stdio.h> #include <cs50.h> #include <stdlib.h> #include <string.h> #include &...
0
votes
1answer
52 views

Caesar: Validating the key - stuck

I am stuck with Caesar, validating the key. Before i use the atoi function, I want to check if argv consists of digits. I watched the linear search movie but is is to cryptic for me. I have to ...
0
votes
1answer
113 views

Checking a string to see if it's an integer

I'm currently working on Caesar and I'm trying to go through each step in turn to complete it. As the problem set requires, I've written code that runs from the command line. The code below ...
0
votes
2answers
266 views

pset2 how to use ctype.h functions

it takes me really long time to figure this out and am not making any progress so i was wondering if someone could help. how do i use, for example, isalpha in if statement. like: if ( argc != 2 |...
0
votes
0answers
40 views

error message with loop with isdigit function

I have trouble with isdigit() function, I get error for line 27-else loop: #include <cs50.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h>...
1
vote
1answer
200 views

pset2 caesar, argv[1]

Ok I'm consistently encountering a peculiar issue that I can't get my head around. this loop should return an error if there is a character other than a digit. When I give a character other than a ...
0
votes
1answer
222 views

Problem with isdigit function

I have this code here but the program is all the time saying that the input isn't a number, even if I enter a digit between 1 and 10. Could you help me to find why? Thanks int main (void){ int ...