Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Structure/Storage question

Reply
Thread Tools

Structure/Storage question

 
 
Sig Lange
Guest
Posts: n/a
 
      01-04-2004
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
 
Reply With Quote
 
 
 
 
Jack Klein
Guest
Posts: n/a
 
      01-04-2004
On Sun, 04 Jan 2004 13:51:11 -0500, Sig Lange <>
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
 
Reply With Quote
 
 
 
 
Joona I Palaste
Guest
Posts: n/a
 
      01-04-2004
Jack Klein <> scribbled the following:
> On Sun, 04 Jan 2004 13:51:11 -0500, Sig Lange <>
> 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 () ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"C++. C++ run. Run, ++, run."
- JIPsoft
 
Reply With Quote
 
Kevin Goodsell
Guest
Posts: n/a
 
      01-04-2004
Joona I Palaste wrote:

> Jack Klein <> 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.
 
Reply With Quote
 
Jack Klein
Guest
Posts: n/a
 
      01-04-2004
On 4 Jan 2004 19:19:32 GMT, Joona I Palaste <>
wrote in comp.lang.c:

> Jack Klein <> scribbled the following:
> > On Sun, 04 Jan 2004 13:51:11 -0500, Sig Lange <>
> > 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
 
Reply With Quote
 
Martin Ambuhl
Guest
Posts: n/a
 
      01-05-2004
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

 
Reply With Quote
 
Richard Heathfield
Guest
Posts: n/a
 
      01-05-2004
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 :
"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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
question row filter (more of sql query question) =?Utf-8?B?YW5kcmV3MDA3?= ASP .Net 2 10-06-2005 01:07 PM
Quick Question - Newby Question =?Utf-8?B?UnlhbiBTbWl0aA==?= ASP .Net 4 02-16-2005 11:59 AM
Question on Transcender Question :-) eddiec MCSE 6 05-20-2004 06:59 AM
Question re: features of the 831 router (also a 924 question) Wayne Cisco 0 03-02-2004 07:57 PM
Syntax Question - Novice Question sean ASP .Net 1 10-20-2003 12:18 PM



Advertisments