Questions tagged [isdigit]

The tag has no usage guidance.

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

For loop proccing too many times

In the code below I check whether or not the string is or isn't a digit. To do that I iterate through every single value entered in the argv[1]. Unfortunately when the entered key is larger than one ...
0
votes
2answers
29 views

Caesar segmentation fault

I prematurely submitted my code without including the if() statements that check if the second command line argument was a digit (if not it would produce an error message). My code was running ...
0
votes
1answer
36 views

Help with Either Command Line Argument or Arrays for Problem set 2 Caesar

I am on Problem Set 2: Caesar. Right now I'm trying to write code that first checks if the second command line argument is a int and if it does prints the integer. I got my program to compile after ...
0
votes
1answer
19 views

Segmentation fault: Pset 2 Caeser isdigit

The log is telling me: "Segmentation fault", and after looking into it, I figured out the problem was in the "isdigit", but i don't know how to fix it, i'm here for about 2 hours ...
0
votes
1answer
30 views

PSET2 Caesar - Stuck at 'isdigit' step: Do I need to learn about pointers, or is something else going on?

Here is what I am attempting, and my errors. I am gathering that I am not grasping the "array of strings nature of argv[], and since I am following along with the material from class, I am pretty ...
0
votes
1answer
27 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
15 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
64 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
160 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
283 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
41 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
214 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
231 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 ...