I have the following question. How can I write a line consist of different data types (string, double, int, etc...) into a file ?. Here are some lines of the code I wrote and m_totalGeneratedPackets is an int :
1 2 3 4
ofstream resultsFile;
resultsFile.open ("interstitial_results.txt", ios::out);
resultsFile << "Total Number of generated packets in nodes is : "<<m_totalGeneratedPackets<<"\n";