0

I want to read data from a file with the following information:
-An integer n (between 1 and 5)
-n Rows of n integers

Example:

3
8 1 6
3 5 7
4 9 2

Which means displaying a 3x3 matrix with the numbers 8 through 2 each in a individual rectangle.

Using the following definitions:
#define SIZE 5
typedef struct
{
int getal;
RECT square;
} item;

typedef item item_array;

My main problem is that I have 'some' experience with c++ in a console environment but not with c in a gui environment.

So I mainly need some help with the reading of the file and storing the data so that I can use it. I know how to put text inside a rectangle

Hopefully my problem is a bit clear

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Ancient Dragon
0

reading files is the same in console and gui programs. The difference between C and C++ is that C++ will use fstream and C will use FILE*. There are many tutorials and code snippets that will show you how to read a file using FILE*. Here is a google list.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.