i understand int cars[23]; can be accessed using pointer notation such as...
int cars[10];
int *carz;
*(carz+1); // carz[1];
im curious as to what the equivalent pointer notation would be for a structure..for example
struct car
{
int wheels;
float gas;
float engineHP;
};
struct car cobalt;
cout << cobalt.engineHP << endl; // what's the equivalent of this in pointer notation?
lochnessmonster 0 Junior Poster
mrnutty 761 Senior Poster
lochnessmonster 0 Junior Poster
mrnutty 761 Senior Poster
VernonDozier 2,218 Posting Expert Featured Poster
lochnessmonster 0 Junior Poster
VernonDozier 2,218 Posting Expert Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.