hi i need some help.
i have to do a linked list using XOR and i don't know how to do it.
thanks
phoenixlsk
0
Newbie Poster
Recommended Answers
Jump to PostPlease elaborate. A linked list I can understand. Exclusive or I can understanc. Doing a linked list using XOR ... I'm not certain what you mean.
Jump to Post>Doing a linked list using XOR ... I'm not certain what you mean.
It's a hack to avoid wasting extra space on links. It takes advantage of the butterfly effect using XOR. If you take the XOR of two values and XOR it with either value, you get the other …
Jump to PostFirst things first. Do you know how to write a regular linked list?
Jump to Post>i found something but it has an error :"xor1001.cpp
>invalid conversion from `void*' to `link*' ".
You're compiling C as C++. C++ doesn't support implicit pointer conversions to and from void*. You have to add casts.>and i don't really understand the program
If you understood it, you could …
All 13 Replies
twomers
408
Posting Virtuoso
phoenixlsk
0
Newbie Poster
phoenixlsk
0
Newbie Poster
Ptolemy
33
Junior Poster in Training
Salem
commented:
Two good answers in one :)
+11
twomers
408
Posting Virtuoso
Ptolemy
33
Junior Poster in Training
twomers
408
Posting Virtuoso
phoenixlsk
0
Newbie Poster
twomers
408
Posting Virtuoso
Ptolemy
33
Junior Poster in Training
phoenixlsk
0
Newbie Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
manojthesingham
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.