#include <iostream> using namespace std; struct Distance { int feet; float inch; }; int main() { Distance *ptr, d; ptr = &d; cout << "Enter feet: "; cin >> (*ptr).feet; cout << "Enter inch: "; cin >> (*ptr).inch; cout << "Displaying information." << endl; cout << "Distance = " << (*ptr).feet << " feet " << (*ptr).inch << " inches"; return 0; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)