I have the 10 classes car and a member of this class is the integer weight
how can i create an aray of the ineger weight with ponters to that member? car
ihvc4 0 Newbie Poster
Recommended Answers
Jump to PostOff the top of me head:
#include <iostream> #include <conio.h> using std::cout; using std::endl; struct TData { float fWeight; float fLength; }; typedef float (TData::*TDataFloatPointer); // pointer to member float CalcAverage(const TData* pArray, int iSize, TDataFloatPointer p) { float fAverage = 0; for(int i = 0; i …
All 3 Replies
kc0arf 68 Posting Virtuoso Team Colleague
glSuccinct 3 Newbie Poster
alc6379 commented: Good to have another programmer helping out here! +3
glSuccinct 3 Newbie 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.