?
Solved

Design question

Posted on 2002-03-14
5
Medium Priority
?
225 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 300 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying 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

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…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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.

762 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