#include "geocoder.h"
#include <stdio.h>

using namespace std;


int main(int argc, char *argv[])
{
    if (argc < 3)
    {
        printf("USAGE: %s <geodb> <expression>\n", argv[0]);
        return 1;
    }

    GeoCoder g(argv[1]);

    pair<float, float> *latlng = g.get_latlng(argv[2]);
    printf("%f, %f\n", latlng->first, latlng->second);

    delete latlng;

    return 0;
}

#include "geocoder.h"
#include <stdio.h>

using namespace std;


int main(int argc, char *argv[])
{
    if (argc < 3)
    {
        printf("USAGE: %s <geodb> <expression>\n", argv[0]);
        return 1;
    }

    GeoCoder g(argv[1]);

    pair<float, float> *latlng = g.get_latlng(argv[2]);
    if (latlng) 
        printf("%f, %f\n", latlng->first, latlng->second);
    else
        printf("NOT FOUND\n");
      
    delete latlng;

    return 0;
}

Print not found when coordinates not found
Print not found when coordinates not found

(i.e. don't crash)
