Quite a few of your scanfs and printfs have the wrong level of indirection in them.
Code:
void Menu(char *purchase)
{
printf("Products:\nG-GPS navigation $4.99\nE-Flashlight $0.99\nE-EBay autobidder $12.99\n");
printf("R-Resturaunt locator $2.99\nP-Game package $9.99\nPlease enter a selection:");
// this is wrong. Scanf expects a pointer to some memory. purchase is a pointer, so you don't need the & here. Using & makes the type char**.
scanf("%c", &purchase);
// also wrong -- should use * to dereference the pointer here.
printf("%c", purchase);//This prints the letter I enter.
}
Code:
printf("%f", item_cost); //This gives me 0.000000 :( Hey, green smilies work! :D Awesome.
quzah mentioned this, you should dereference item_cost. I couldn't get MSVC to give a warning about this either. I don't know if I'd expect it to... since C isn't very strict about types and pointers can be interpreted as integral types (addresses). Don't know. IT'd be nice!
Last problem, this one you might kick yourself for:
Code:
void GetCost(char purchase, double *item_cost)
{
if (purchase=='g')
/* item_cost is a double, so you should not have single quotes around the 4.99. You should have no quotes, like *item_cost=4.99; */
*item_cost='4.99';
else
/* Same here */
*item_cost='5.99';
printf("%f", item_cost); //This gives me 0.000000 :( Hey, green smilies work! :D Awesome.
}