Structure/Storage question

S

Sig Lange

I need an efficient structure to store a counter and an IP address. I'm
thinking a hash would be the fastest method but I'm not sure.

Any comments questions would be much appreciated...

Thank You,
Sig
 
J

Jack Klein

I need an efficient structure to store a counter and an IP address. I'm
thinking a hash would be the fastest method but I'm not sure.

Any comments questions would be much appreciated...

Thank You,
Sig

You need a hash to store a (one) counter and an (one) IP address?
Seems like overkill to me. Also there doesn't seem to be anything C++
specific in your question.

You need to provide a better problem statement, and if a storage and
retrieval algorithms are your primary concern, ask in an algorithm
group such as After you have selected an
appropriate algorithm, if you have difficulty implementing it in
standard C++, post your problem code here and ask for help.
 
J

Joona I Palaste

You need a hash to store a (one) counter and an (one) IP address?
Seems like overkill to me. Also there doesn't seem to be anything C++
specific in your question.

Where did you see anyone mention C++?
You need to provide a better problem statement, and if a storage and
retrieval algorithms are your primary concern, ask in an algorithm
group such as After you have selected an
appropriate algorithm, if you have difficulty implementing it in
standard C++, post your problem code here and ask for help.

Where did you see anyone mention C++?
 
K

Kevin Goodsell

Joona said:
Where did you see anyone mention C++?

He must have thought he was reading comp.lang.c++. Easy mistake to make
if you read both that group and this one.

Obviously the OP should ask standard C++ questions in comp.lang.c++, not
here. But if one has a standard C question, this is the place.

-Kevin
 
M

Martin Ambuhl

Jack said:
After you have selected an
appropriate algorithm, if you have difficulty implementing it in
standard C++, post your problem code here and ask for help.

No, please don't. Jack normally doesn't slip this way. If you have a C++
problem, post to comp.lang.c++. "Here" is comp.lang.c, for which you
should have a C problem.
 
R

Richard Heathfield

Martin said:
No, please don't. Jack normally doesn't slip this way. If you have a C++
problem, post to comp.lang.c++. "Here" is comp.lang.c, for which you
should have a C problem.

Martin normally doesn't slip this way. :)

Of course you /don't/ need a C problem in order to post in comp.lang.c. You
might have an *answer* to a problem, or a correction or observation
regarding someone else's answer, or you might just have an interesting
snippet of C news, such as the release of another conforming C99
implementation, a decent new book, a handy new library, or maybe just some
C code that you happen to think is noteworthy for some reason.

This is, after all, a *news*group.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top