Jump to content

where do you get an error?

 

what's nptr on line 85? i don't think it's initiated in this scope

 

that's the only thing i see

 

edit: to clarify i see that nptr is a node you make a bit lower but if i'm not mistaken line 85 will be called outside of that and they don't share the value's scope. the functions of a class don't share instantiated variables.

Primary System

  • CPU
    Ryzen R6 5700X
  • Motherboard
    MSI B350M mortar arctic
  • RAM
    32GB Corsair RGB 3600MT/s CAS18
  • GPU
    Zotac RTX 3070 OC
  • Case
    kind of a mess
  • Storage
    WD black NVMe SSD 500GB & 1TB samsung Sata ssd & x 1TB WD blue & x 3TB Seagate
  • PSU
    corsair RM750X white
  • Display(s)
    1440p 21:9 100Hz
Link to post
Share on other sites

 

2 hours ago, Aegis_Titan said:

if you could write a small correction in it I would appreciate it!

It won't really help your friend learn how to code if we just write a fix and send it his/her way. I'll explain what is currently going wrong, and let them learn by implementing the fix themselves.

 

the first problem is that when inserting new elements into the linked list, they are not setting the next node for the end node, meaning the doubly linked list isn't circularly linked.

The next issue is that is the display() method is not currently accounting for the linked list being circular, so once the first issue is fixed they'll need to address that to avoid an infinite loop.

Gaming build:

CPU: i7-7700k (5.0ghz, 1.312v)

GPU(s): Asus Strix 1080ti OC (~2063mhz)

Memory: 32GB (4x8) DDR4 G.Skill TridentZ RGB 3000mhz

Motherboard: Asus Prime z270-AR

PSU: Seasonic Prime Titanium 850W

Cooler: Custom water loop (420mm rad + 360mm rad)

Case: Be quiet! Dark base pro 900 (silver)
Primary storage: Samsung 960 evo m.2 SSD (500gb)

Secondary storage: Samsung 850 evo SSD (250gb)

 

Server build:

OS: Ubuntu server 16.04 LTS (though will probably upgrade to 17.04 for better ryzen support)

CPU: Ryzen R7 1700x

Memory: Ballistix Sport LT 16GB

Motherboard: Asrock B350 m4 pro

PSU: Corsair CX550M

Cooler: Cooler master hyper 212 evo

Storage: 2TB WD Red x1, 128gb OCZ SSD for OS

Case: HAF 932 adv

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×