By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,655 Members | 959 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,655 IT Pros & Developers. It's quick & easy.

Structure/Storage question

P: n/a
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
Nov 14 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
On Sun, 04 Jan 2004 13:51:11 -0500, Sig Lange <ex****@signuts.net>
wrote in comp.lang.c:
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 news:comp.programming. 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.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Nov 14 '05 #2

P: n/a
Jack Klein <ja*******@spamcop.net> scribbled the following:
On Sun, 04 Jan 2004 13:51:11 -0500, Sig Lange <ex****@signuts.net>
wrote in comp.lang.c:
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...
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 news:comp.programming. 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++?

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"C++. C++ run. Run, ++, run."
- JIPsoft
Nov 14 '05 #3

P: n/a
Joona I Palaste wrote:
Jack Klein <ja*******@spamcop.net> scribbled the following:
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++?


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

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 news:comp.programming. 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.


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
--
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.
Nov 14 '05 #4

P: n/a
On 4 Jan 2004 19:19:32 GMT, Joona I Palaste <pa*****@cc.helsinki.fi>
wrote in comp.lang.c:
Jack Klein <ja*******@spamcop.net> scribbled the following:
On Sun, 04 Jan 2004 13:51:11 -0500, Sig Lange <ex****@signuts.net>
wrote in comp.lang.c:
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...
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++?


Bad hair day!
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 news:comp.programming. 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++?


I was momentarily insane, but I'm better now.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Nov 14 '05 #5

P: n/a
Jack Klein wrote:
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.

--
Martin Ambuhl

Nov 14 '05 #6

P: n/a
Martin Ambuhl wrote:
Jack Klein wrote:
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.


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.

--
Richard Heathfield : bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 14 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.