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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.