Working on Project almost done

After a bit of a wake-up call, by a certain jerk, I was able to rework my project c++ code, However, I still need help with the creation of the add range function, the add element function.(finished the remove duplicate it worked)



And to make this easy: this is what they want:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Please use "display" function to display all data.
    // display function should display both array element (=range) and list (=elements).
    // d.display();
    // 
    // Please refer figure in project description for example below
    // index 0: [0 - 9] 9, 1, 8----int index_a[10]=(0,1,2,3,4,5,6,7,8,9)
    // index 1: [10 - 19] 10, 15, 19----- int index_b[10]=(10,11,12,13,14,15,16,17,18,19)
    // index 2: [91 - 100] 95, 95-------- int index_c[10]= (91,92,93,94,95,96,97,98,99,100)
    // index 3: [21 - 23] 21, 23, 21------ int index_d[3]= (21,22,23)


    // Please use "add_range" function to add a new range
    // fuction arguments are depending on your code
    // d.add_range();


    // please use "add_element" function to add an element in the list
    // example function areguments are as follows
    // add_element( int StartRange, int EndRange, int Element)
    // => Element should be added in the list referenced by range (StartRange and EndRange)
    // OR
    // add_element( int ArrayIndex, int Element )
    // => Element should be added in the list referenced by ArrayIndex 

Last edited on
add range function, the add element function

What is it supposed to do?
Its suppose to help add a new range or list for a doubly linked list dynamic array to display the numbers look at the indexs, its suppose to do that first part not the dummy array crap I thought could work. And the element is suppose to add a new element even if its inside to that range.
Its suppose to help add a new range or list
Yes, it's reasonable to assume that a function called add_range adds a range. But what is a range, and where is it being added? What data structure is it being added to?

I'm just a random programmer on the internet. Share specifics.

for a doubly linked list dynamic array
Before you erased the code in your OP, I looked over the code you had posted. It implemented a singly-linked list. Now you mention a doubly-linked list and an array. Which is it?

to display the numbers look at the indexs, its suppose to do that first part not the dummy array crap I thought could work.
I have no idea what you're talking about.
Last edited on
its fine yeah its suppose to be a double linked list, welp, I fucked up its suppose to be a double linked list dynamic array program for integers with ranges, along with being able to add elements, merge the ranges, etc. I thought had it all done but well, I am dead in the water.
Last edited on
Without seeing the code you have already, how on earth do you expect us to be able to give any advice on how to modify it?
Topic archived. No new replies allowed.