Rhaaa.

Either I'm stupid, or this is difficult :|

I still cant make it working :/ I used:

Code:
    char **pagenames[250]; //arrays for filenames
    char **paths[250]; //arrays for paths
.
.
.
 fgets(*paths[i],250,readindex); //stores paths in arrays
        fgets(*pagenames[i],250,readindex); //stores filenames in arrays
to store the names & paths, and it seemed to work. (well, compiler didn't tell me I shouldn't do that, as it told if I had just char* paths[250] there.. )

But the prolem is the class thingee...

Code:
tiedosto *pagefiles[250];
.
.
.
tiedosto *pagefiles[i] = new tiedosto(*pagenames[i],*paths[i]);
just simply makes the compiler to tell me, that the "variable-sized object 'pagefiles' may not be initialized". :|

If I use

Code:
tiedosto pagefiles[i] = new tiedosto(*pagenames[i],*paths[i]);
It gives me the same error, and also tells me "no matching function for call to tiedosto::tiedosto()"
candidates are tiedosto::tiedosto(const tiedosto&)
and tiedosto::tiedosto(char*,char*).

mmm.. My wild guess is that it is related to the fact my constructor needs arguments. (I did not do constructor without arguments in the class... I bet there is a way to do it without creating such constructor :| )

Thanks for the example anyways