A problem asks me to make a printf statement which will print out the members of the struct given, I wrote a program to make sure I would get the right printf statement.
#include <stdlib.h>
#include <stdio.h>
int main()
{
struct house
{
5. char style[40];
int rooms;
float price;
}*hPtr;
10. (*hPtr).style = "abc";
(*hPtr).rooms = 4;
(*hPtr).price = 10.0; /*values were used so that printf is possible*/
13. printf("%s %d %f\n", (*hPtr).style, (*hPtr).rooms, (*hPtr).price);
return 0;
}
however i get the error
test.c.13: error: incompatible types in argument
what am i missing?