I'm writing this program in C that grabs contact information. I'm passing the pointer of a struct within a struct to a function that gets the address information, but when scanning the information into the pointer location I get a debug error.
Here's my code:
void getAddress(struct Address* address)
{
// Street Number
do // Validate the street number
{
printf("Please enter the contact’s street number: ");
scanf("%d", address->streetNumber); //<----where the error is
} while (address->streetNumber <= 0);
clearIS(); // Clears input stream
streetNumber, not the value of the variable:scanf("%d", &address->streetNumber);- Pabloaddress->streetNumberbeing zero. I'm surprised to see asserts active in a runtime library. - jarmod