9 Replies - 2190 Views - Last Post: 14 May 2005 - 12:36 PM Rate Topic: -----

#1 canibus  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 12-May 05

C++ data structures question

Posted 12 May 2005 - 08:55 AM

hey,i'm a nu user & i have the following question..

Q:
a program that adds nodes @ the begining,the midle & the end of a :
linked-list,double-linked list,linked queue & contiguous list.

help appreciated

peace
Is This A Good Question/Topic? 0
  • +

Replies To: C++ data structures question

#2 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

Re: C++ data structures question

Posted 12 May 2005 - 09:13 AM

That's not a question, it's a request for a program. What have you got so far?
Was This Post Helpful? 0
  • +
  • -

#3 canibus  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 12-May 05

Re: C++ data structures question

Posted 12 May 2005 - 03:01 PM

well,ya..
request for a program

to be honest,i have got nothin till now..
Was This Post Helpful? 0
  • +
  • -

#4 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

Re: C++ data structures question

Posted 12 May 2005 - 06:59 PM

Well, I assume this is for a school assignment, so I'll tell you that we don't generally provide whole programs...I will, however, start you out with the following struct to get you started.
struct node
{
   int value;
   node *next;
};

int main(void)
{
   node *begin_node = NULL;
   return 0;
}


Please note that the structure defined is not exactly what you'll require to complete all facets of the assignment, but is enough to get you started.
Was This Post Helpful? 0
  • +
  • -

#5 canibus  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 12-May 05

Re: C++ data structures question

Posted 13 May 2005 - 06:06 AM

well bro its not an assignment
but i have a data structure exam on sunday..
but coz i work i didnt have time to study it till now
so the teacher said if we write the program i requested
that means we understand it all..
so i'm gonna study & i hoped that u guys in here would help me with
the code,so when i finish studyin(that would be saturday night) i'll check this program & would be able to understand it and get the point of it..

u know when u finish studyin this load of material u haven't study b4
u won't be able to write the program after u finish

so PLZ help me with that,and i'll be so thankfull
Was This Post Helpful? 0
  • +
  • -

#6 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

Re: C++ data structures question

Posted 13 May 2005 - 07:22 AM

But you haven't asked for help with the code, you've asked for the code...your prof is correct, you would understand the material if you wrote the program, but you won't if you're simply reading a program that someone else wrote.

We're more than willing to help you understand how to do it, and guide you along the way, but there has to be some indication that you've tried the program yourself, and got to a point where you'd like some advice. See what I mean?

If it's really just the program you're looking for, you can google 'c++ linked lists'. There are many ready to go programs out there, freely available.
Was This Post Helpful? 0
  • +
  • -

#7 dorknexus  Icon User is offline

  • or something bad...real bad.
  • member icon

Reputation: 1256
  • View blog
  • Posts: 4,618
  • Joined: 02-May 04

Re: C++ data structures question

Posted 13 May 2005 - 05:57 PM

maybe you should divert your efforts to english classes

This post has been edited by Dark_Nexus: 13 May 2005 - 05:57 PM

Was This Post Helpful? 0
  • +
  • -

#8 runtime error  Icon User is offline

  • Lucky.Code
  • member icon

Reputation: 3
  • View blog
  • Posts: 629
  • Joined: 19-March 01

Re: C++ data structures question

Posted 14 May 2005 - 01:17 AM

we only help with code that is already written sorry, how about you write some code and we will help you understand it. whether it is for a test or not we do not write programs for people.

Also notice your teacher if YOU write the program you will understand it. Thats generally how programming works:
1)Try writing some code
2)See if the code works
3)If it doesn't work or you don't understand it then find resources (such as dreamincode) on how to fix it or why it something is the way it is.
4) go to step 1 till the program works and you understand why it works.

If you are having problems as you are writing the program or you don't quite understand something as you are studying, let us know we will help you understand it or we will help you fix the bug in the program and explain why.
Was This Post Helpful? 0
  • +
  • -

#9 canibus  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 12-May 05

Re: C++ data structures question

Posted 14 May 2005 - 07:14 AM

ok,fellas..
i guess i'll try to write that code
& u guys will help me if i had problems..
Was This Post Helpful? 0
  • +
  • -

#10 runtime error  Icon User is offline

  • Lucky.Code
  • member icon

Reputation: 3
  • View blog
  • Posts: 629
  • Joined: 19-March 01

Re: C++ data structures question

Posted 14 May 2005 - 12:36 PM

canibus, on May 14 2005, 07:14 AM, said:

ok,fellas..
i guess i'll try to write that code
& u guys will help me if i had problems..

absolutely we are here to help
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1