bhavinvyas28 0 Newbie Poster

How to Store Multiple file data in nested structures.
i have for e.g

File1.txt

ADD:1,2
MULTIPLY:3,4
PRINT:HELLO WORLD

File2.txt

SUBTRACT:4,5
DIVIDE:5,7
PRINT:HELLO NAME

I need a C Program to store The file data in structures.
And According to command given should do what is required.
The size of data can increase or its flexible.
I have 10 files like this.
It should store all files data and retrive it as required.

Like if I fire a Command:
EXECUTE FILE1
then it should parse file1.txt and give output.

struct file{





};


struct Command{




};

struct parameters{




};

Can anyone give me a function who can store data in these structure.
Using malloc, calloc and Realloc.

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.