My input file is as below.


Now here the first token designate the nodal name. Now what i want is to create a set of file
name AXY_info.txt,VBE_info.txt,AXX_info.txt and here file name designating the nodal name and each file should contain their respective values. So for that i need to create an array of files depending on the number of distinct nodal points. Also i m facing problem while calling the close() for these files as i m not able to know how many files are being created in advance. How should i do this.
Kindly help

Recommended Answers

All 2 Replies

With 28 posts you should know by now that you have to post code if you expect anyone to be able to answer your question.

If the nodal name is a string type, you can simply add "_info.txt" to it to create the file name. Open and output the rest of the line. Close the file. Read the next nodal name.

Be a part of the DaniWeb community

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