Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

hi I want to read the textfile from visual studio. the data to be read is struct array. please see the below text file -------------------------------------------------------------------------------------------------------------

hi I want to read the textfile from visual studio.

the data to be read is struct array.

please see the below

text file

-------------------------------------------------------------------------------------------------------------

80599|20020|1|No power/does not turn on|1|C|Shrimpy Shrimp|The unit won't turn on - please help.|

60001|30004|1|Frequent Disconnects|5|C|Betty Boop|Every time I go near the microwave the unit disconnects.|A|Will Smith|Don't go near the microwave.|A|Will Smith|It will radiate waves which will interrupt the unit.|C|Betty Boop|But I use the microwave a lot.|A|Will Smith|You cook too much!|

64611|20020|0|It gets hot and smokes|4|C|Shrimpy Shrimp|When I put it in the oven, it gets hot and starts smoking.|A|Will Smith|It is not designed to be put in the oven - your warranty is now void.|C|Shrimpy Shrimp|So you won't fix it?|A|Will Smith|No - you will have to purchase another.|

30530|30004|1|Does not respond to command...|20|C|Betty Boop|Installation went fine, but it doesn't respond to my commands.|A|Fred Flintstone|What commands in particular?|C|Betty Boop|It does not like it when I tell it to jump off a bridge.|A|Fred Flintstone|Why would you ask it do that? Robots are sensitive too, and won't self destruct.|C|Betty Boop|I told it I would repair it, and besides, it is supposed to do what I command.|A|Fred Flintstone|It has limits - and will not cause harm to others or itself.|C|Betty Boop|But the instructions don't mention that.|A|Fred Flintstone|Did you read page 48?|C|Betty Boop|No, I could only read up to page 25.|A|Fred Flintstone|Why can't you read beyond page 25?|C|Betty Boop|The robot hid the instructions.|A|Fred Flintstone|Wait... you didn't read about robot retaliation?|C|Betty Boop|What does it say about retaliation?|A|Fred Flintstone|When a robot is not respected, it will discover ways to get back at you.|C|Betty Boop|Now it has hidden my phone and car keys.How do I fix this?|A|Fred Flintstone|The only way to fix your relationship is to apologize in a public place.|A|Fred Flintstone|...and you must do it on your knee's using a sympathetic tone.|C|Betty Boop|What if it doesn't believe me?|A|Fred Flintstone|You do NOT want to know the answer to that :(|A|Fred Flintstone|Hello?|

80004|20020|1|My head hurts!|3|C|Shrimpy Shrimp|When the unit is placed on my head it hurts.|A|Will Smith|Don't place it on your head.|C|Shrimpy Shrimp|I don't understand - why not?|

70533|30004|1|Nothing happens...|20|C|Betty Boop|Instructions state to 'say yes' to the prompts - but nothing happens.|A|Fred Flintstone|Is this when setting up the unit for the first time?|C|Betty Boop|Yes - it asks me if I'm ready to start and I tell it 'yes' nothing happens.|A|Fred Flintstone|Are you pressing the 'yes' button on the unit?|C|Betty Boop|No, instructions state to say yes - not press any buttons.|A|Will Smith|'say' was meant to be interpreted as press the 'yes' button.|C|Betty Boop|But the instructions don't mention any buttons.|A|Will Smith|Agreed, it isn't very clear, but you must press the yes button.|C|Betty Boop|There's no button in the instruction booklet.|A|Will Smith|The button isn't in the instructions, it will be on the device.|C|Betty Boop|Oh I get it that now makes sense.|C|Betty Boop|Wait... I get further now, but it's stops after pressing the yes button.|A|Will Smith|What is the problem now?|C|Betty Boop|The instructions state to 'say no' if I have health issues.|A|Will Smith|Do you have health issues?|C|Betty Boop|No.|A|Will Smith|Then what is the problem exactly?|C|Betty Boop|It doesn't do anything when I say No.|A|Will Smith|Again, you don't 'say' no, you must press the no button.|C|Betty Boop|Oh I get it now - thanks!|

80020|30004|1|It's broken/does not work|19|C|Betty Boop|When I took it out of the box, it was in pieces.|A|Will Smith|You have to assemble it - read the instructions.|C|Betty Boop|What are instructions?|A|Will Smith|The paper document that look's like a book with words.|C|Betty Boop|Oh - right, okay so it says to snap part-1 to part-2.|C|Betty Boop|Hello? what should I do?|C|Betty Boop|Then it says to place part-3 on parts 1 and 2 then twist.|C|Betty Boop|Please help... I don't know what this means.|A|Will Smith|It's been 9 months, are you still unable to assemble it?|C|Betty Boop|Yes, I am stuck on instruction 2 the twist part.|A|Will Smith|Place part-3 into the grooves of parts 1 and 2, then rotate clockwise.|C|Betty Boop|Why?|C|Betty Boop|Hello?|C|Betty Boop|Well I did what you said, now it's in 3 pieces again.|A|Will Smith|What did you do?|C|Betty Boop|I put part-3 in the grooves, than I turned clockwise causing it to fall off the table.|A|Will Smith|You were to rotate part-3 not turn yourself around!|C|Betty Boop|Well now what do I do?|A|Will Smith|What do you think?|

80204|30001|1|It's very messy!|2|C|Silly Sally|It this supposed to be so messy?|A|Will Smith|It's a slime blaster - so yes, it is supposed to be VERY messy!|

40599|35049|1|Power Issue|1|C|Buck Odom|The unit won't turn on - please help.|

40001|30021|1|Connectivity Problem|5|C|Kane Lancaster|Every time I go near the microwave the unit disconnects.|A|Will Smith|Don't go near the microwave.|A|Will Smith|It will radiate waves which will interrupt the unit.|C|Kane Lancaster|But I use the microwave a lot.|A|Will Smith|You cook too much!|

44611|35049|0|Unit is burning up|4|C|Buck Odom|When I put it in the oven, it gets hot and starts smoking.|A|Will Smith|It is not designed to be put in the oven - your warranty is now void.|C|Buck Odom|So you won't fix it?|A|Will Smith|No - you will have to purchase another.|

40530|30021|1|Not doing what it's told...|20|C|Kane Lancaster|Installation went fine, but it doesn't respond to my commands.|A|Fred Flintstone|What commands in particular?|C|Kane Lancaster|It does not like it when I tell it to jump off a bridge.|A|Fred Flintstone|Why would you ask it do that? Robots are sensitive too, and won't self destruct.|C|Kane Lancaster|I told it I would repair it, and besides, it is supposed to do what I command.|A|Fred Flintstone|It has limits - and will not cause harm to others or itself.|C|Kane Lancaster|But the instructions don't mention that.|A|Fred Flintstone|Did you read page 48?|C|Kane Lancaster|No, I could only read up to page 25.|A|Fred Flintstone|Why can't you read beyond page 25?|C|Kane Lancaster|The robot hid the instructions.|A|Fred Flintstone|Wait... you didn't read about robot retaliation?|C|Kane Lancaster|What does it say about retaliation?|A|Fred Flintstone|When a robot is not respected, it will discover ways to get back at you.|C|Kane Lancaster|Now it has hidden my phone and car keys.How do I fix this?|A|Fred Flintstone|The only way to fix your relationship is to apologize in a public place.|A|Fred Flintstone|...and you must do it on your knee's using a sympathetic tone.|C|Kane Lancaster|What if it doesn't believe me?|A|Fred Flintstone|You do NOT want to know the answer to that :(|A|Fred Flintstone|Hello?|

40004|35049|1|Causes bodily harm!|3|C|Buck Odom|When the unit is placed on my head it hurts.|A|Will Smith|Don't place it on your head.|C|Buck Odom|I don't understand - why not?|

40533|30021|1|Doesn't respond...|20|C|Kane Lancaster|Instructions state to 'say yes' to the prompts - but nothing happens.|A|Fred Flintstone|Is this when setting up the unit for the first time?|C|Kane Lancaster|Yes - it asks me if I'm ready to start and I tell it 'yes' nothing happens.|A|Fred Flintstone|Are you pressing the 'yes' button on the unit?|C|Kane Lancaster|No, instructions state to say yes - not press any buttons.|A|Will Smith|'say' was meant to be interpreted as press the 'yes' button.|C|Kane Lancaster|But the instructions don't mention any buttons.|A|Will Smith|Agreed, it isn't very clear, but you must press the yes button.|C|Kane Lancaster|There's no button in the instruction booklet.|A|Will Smith|The button isn't in the instructions, it will be on the device.|C|Kane Lancaster|Oh I get it that now makes sense.|C|Kane Lancaster|Wait... I get further now, but it's stops after pressing the yes button.|A|Will Smith|What is the problem now?|C|Kane Lancaster|The instructions state to 'say no' if I have health issues.|A|Will Smith|Do you have health issues?|C|Kane Lancaster|No.|A|Will Smith|Then what is the problem exactly?|C|Kane Lancaster|It doesn't do anything when I say No.|A|Will Smith|Again, you don't 'say' no, you must press the no button.|C|Kane Lancaster|Oh I get it now - thanks!|

40020|30021|1|Damaged and in pieces|19|C|Kane Lancaster|When I took it out of the box, it was in pieces.|A|Will Smith|You have to assemble it - read the instructions.|C|Kane Lancaster|What are instructions?|A|Will Smith|The paper document that look's like a book with words.|C|Kane Lancaster|Oh - right, okay so it says to snap part-1 to part-2.|C|Kane Lancaster|Hello? what should I do?|C|Kane Lancaster|Then it says to place part-3 on parts 1 and 2 then twist.|C|Kane Lancaster|Please help... I don't know what this means.|A|Will Smith|It's been 9 months, are you still unable to assemble it?|C|Kane Lancaster|Yes, I am stuck on instruction 2 the twist part.|A|Will Smith|Place part-3 into the grooves of parts 1 and 2, then rotate clockwise.|C|Kane Lancaster|Why?|C|Kane Lancaster|Hello?|C|Kane Lancaster|Well I did what you said, now it's in 3 pieces again.|A|Will Smith|What did you do?|C|Kane Lancaster|I put part-3 in the grooves, than I turned clockwise causing it to fall off the table.|A|Will Smith|You were to rotate part-3 not turn yourself around!|C|Kane Lancaster|Well now what do I do?|A|Will Smith|What do you think?|

40204|53070|1|It's very messy!|2|C|Wylie Pollard|It this supposed to be so messy?|A|Will Smith|It's a slime blaster - so yes, it is supposed to be VERY messy!|

--------------------------------------------------------------------------------------------------------------

the structure array is

struct Ticket

{

int uniqNo;

int csacNO;

int Ticketstatus;

char subjeceline[30];

int counter;

struct Messages

{

char accountType1;

char displayname[30];

char message[150];

} messages[30];

} tickets;

How can I read the text file by using structure array...(I want to read txt file by function)

please let me know the logic.!!! help me!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions