954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

array of files in C

Hi
I want to know...
can we able to create array of files and how ?????????

dhanashree
Newbie Poster
2 posts since Sep 2004
Reputation Points: 10
Solved Threads: 0
 

you can try it by yourself. :)

XianBin
Newbie Poster
24 posts since Aug 2004
Reputation Points: 15
Solved Threads: 0
 

You could certainly have an array of file HANDLES or the like...

FILE* myFiles[10];

for (int i = 0; i < 10; i++)
    myFiles[i] = fopen("Chainsaw.txt","r");

is that what you mean?

Chainsaw
Posting Pro in Training
436 posts since Jun 2004
Reputation Points: 36
Solved Threads: 11
 

Hello,

An array of files makes no sense. Arrays are data structures; files are residents of a file system on a hard drive (or RAMdrive).

What are you really trying to do?

Christian

kc0arf
Posting Virtuoso
Team Colleague
1,937 posts since Mar 2004
Reputation Points: 121
Solved Threads: 57
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You