Solved

Design question

Posted on 2002-03-14
5
223 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

732 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