Best data Structure

Hello All,

My Need : My application need to log all the trace messages. I dont want to loose even one.

My Question : Which data strcuture is the best ? Dont worry about thread scheduling or something . I just want to know which one will be the most efficient?

My Ideas :

STL Vector : Thought of it but removed it bcos it costed lot of copies.

STL Deque : Thinking about it ? What you guys say ?

Auto Pointer : Array of auto pointers

Please let me know your views.

Thanks Rakesh

Reply to
Rakesh
Loading thread data ...

This is a lot like asking what color is best. In the absence of more information any answer must have a high degree of subjectivity.

Are these trace messages being written to disk? flash memory? printer? Do you care if messages are lost due to power failure? What format are the messages in? Are they being stored at the point where they are generated or are they passed on? When you say "most efficient", do you mean in terms of space or time or something else?

The answers to each of these questions can have a large impact upon the decision of how, where and how long to store messages.

Good luck

Joe Power

Reply to
Joseph Power

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.