Solved

Design question

Posted on 2002-03-14
5
219 Views
Last Modified: 2010-04-01
I have a function which reads orders and builds a list of orders. The elements of the order data has to be converted into another format and sent over the network to a receiving program which will re-convert the data and use it. Something like this:
send(){
Read orders;
Build Orderlist;
Outlist=convert(inlist)}
}
I have to design and develop the convert functionality.
What is the approach I should take?
I was suggested to use templates for the conversion. Is it required? Is there any easier way to solve the problem.
Thanks in advance.
0
Comment
Question by:bitnal
5 Comments
 
LVL 1

Expert Comment

by:lidorc
ID: 6866282
Hi bitnal,
Are the orders plane text? Do you need to write a function that converts a list of some data - like text, to a list of text too? If I understood correctly, then where is the problem and why template?
0
 
LVL 2

Accepted Solution

by:
LoungeLizard earned 75 total points
ID: 6867084
Well, that depends on the exact format of the orders and what the conversion is. However, if you are talking about dynamic lists (grows as you add items) that need to be sorted or searched through then you would probably go for the STL (which, as the name suggests, uses templates extensively)
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 6867488
The first thing to do would be to write a convert function that would convert the data from one format to the other.

Then the second task would be to... er... uh... then you would be finsished!

-- Dan
0
 
LVL 11

Expert Comment

by:griessh
ID: 6955376
Dear bitnal

I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity,  I will suggest to accept

     "LoungeLizard"

comment(s) as an answer.

If you think your question was not answered at all, you can post a request in Community support (please include this link) to refund your points. The link to the Community Support area is: http://www.experts-exchange.com/commspt/

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
 
LVL 6

Expert Comment

by:Mindphaser
ID: 6979088
Force accepted

** Mindphaser - Community Support Moderator **
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now