Solved

Design question

Posted on 2002-03-14
5
218 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
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.

743 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

12 Experts available now in Live!

Get 1:1 Help Now