Skip to main content

Timeline for Credit card validation

Current License: CC BY-SA 3.0

6 events
when toggle format what by license comment
S Aug 16, 2015 at 14:20 history suggested CommunityBot CC BY-SA 3.0
reply to comment too long for a comment
Aug 16, 2015 at 12:31 review Suggested edits
S Aug 16, 2015 at 14:20
Aug 16, 2015 at 12:00 comment added IceArdor GetLongLong() exists for a good reason. I distinctly remember not liking atoi and cin >> var, having to deal with whitespace/newline characters getting left on stdin, trying to peek/putback values, buffer the characters into a fixed-length array when I started programming. Even though this problem could be solved with string manipulation, you have to remember how limiting your toolset was when you first started out programming.
Aug 16, 2015 at 11:02 comment added Stefan Rendevski The function 'GetLongLong()' will reprompt the user if the entered value is not a (long long) int, that's why I went with it. But the cs50.h library is meant to be a helper library for the first few weeks, so I guess I should try your method. Regarding the second assumption, do you ever check for the length of the inputted number? If yes, would you do it before or after the switch statement?
Aug 16, 2015 at 9:30 review First posts
Aug 16, 2015 at 10:06
Aug 16, 2015 at 9:21 history answered peter CC BY-SA 3.0