I keep getting a segfault, and help50 doesn't help. A lot of head scratching an googling later, I think I've narrowed it down to: you can't convert a long to a string. Is that true? The code in question:
#include <stdio.h>
#include <cs50.h>
int main(void)
{
long card = get_long("Number: ");
string card_str = (string) card;
printf("Card long %i\n", card);
printf("Card string %c\n", card_str[1]);
}
When run, I get:
~/pset1/credit/ $ ./credit
Number: 100
Card long 100
Segmentation fault