The table is int weight[10][5] it is a table of a series of
different sets of: 10101 I was trying to read with fscan I beieve the file opens as it passes my error check to open the file. I'm getting something out of it, but it is not correct. For each 0 I want to print a ":" and for each 1 a "|" per column. I need to be able to tell the program what row I want it to read. I can find information on char but I'm not finding anything on reading tables that contain numbers. Any help would be appreciated. I'm not that faniliar with C++.
You have some sort of data file you want to read a table from. First of all, again, what format is this data file in? Is it text? It sounds short. Just post an example of what the file would look like.
You say something about an array and about printing ":" and "|". Those sound like two different problems. Do you mean you want to store these characters in the array? Do you want to store the values you read in the array and then print the corresponding characters out? In that case, do you actually need the intermediate array, or can you just read the file and print the output directly?
Be a bit clearer about what you're trying to accomplish. Post a sample data file and describe the result you'd expect from it. It also might help to know sorta what you're trying to do.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.