I'm trying to figure out a method of taking a user input character and converting it to a double. I've tried the `atof` function, though it appears that can only be used with constant characters. Is there a way to do this at all? Heres an idea of what I'd like to do:

```
#include <iostream>
#include <stdio.h>
#include <stdlib.h>

int main(){

    char input;
    double result;

    cin >> input; 

    result = atof(input);
}

```