Please can someone help me and send me in the right direction. I am making a program that reads a text file and then out puts the data into a datagrid, the text file looks like this: [HRData] 84 73 0 -124 0 50 84 73 0 -124 0 50 84 84 0 -124 0 50 87 109 0 -124 0 50 82 120 0 -124 0 50 82 132 0 -124 0 50 83 143 0 -124 0 50 83 154 0 -124 0 50 85 171 77 -124 0 50 86 179 84 -125 121 3893 87 190 …

Member Avatar
Member Avatar
+0 forum 1

I'm trying to read information from a text file and populate an array of structs using a pointer. I keep getting an error and I'm not sure how to fix it. Any help, comments, or tips are greatly appreciated! Thanks in advance for your time and help! error: request for member 'budget_num'in 'ptr', which is of non-class type 'budget*' struct budget { int budget_num; string name; float budget_value; }; //Declare file streams ifstream inFile; ofstream outFile; int main() { //Declare variables budget company[15]; budget *ptr; //string MyString = ""; ptr = &company[0]; //Open inFile inFile.open("ledger.dat"); while(!inFile) { cout << "Error …

Member Avatar
Member Avatar
+0 forum 6

The End.