I have a class definition as the following
I'm trying to write all the vector contents into its own text file. However, I'm not sure what's the easiest way of doing so. I have looked into fwrite, fprintf, and fstream classes, but not sure about the easiest way to go in terms of dumping the contents for a vector into a file. An example would be much appreciated. Thanks.Code:class SimulationTiming { public: LARGE_INTEGER freq; LARGE_INTEGER startTime; LARGE_INTEGER stopTime; vector<float> locateNeedleTime; vector<float> setConstraintAngleTime; vector<float> checkSurfaceTime; vector<float> addNodeTime; vector<float> computeThresholdsTime; vector<float> resolveInterceptTime; vector<float> mmult2time; vector<float> updateLCSXYZtime; vector<float> BCCtime; vector<float> ConstraintDispXYZtime; vector<float> ConstriantDispXZtime; vector<float> UpdateLCSXZtime; vector<float> solvesystemtime; vector<float> projectiontime; vector<float> computeNNDistanceTime; vector<float> projectforcestime; vector<float> integrateforcestime; vector<float> findallnodestime; vector<float> solveneedlespringtime; vector<float> initvartime; public: SimulationTiming(void); void startTimer(void); void stopTimer(vector<float> *list); ~SimulationTiming(void); };