So all my classes are connected and the list is kinda working but it (0,test, again and 54) won’t appear in the debugger and I tried to make a display for it and put it after to show(I don’t have it in this screenshot) but that didn’t work either. (I have included image showing what I am saying as I am no good at typing/explaining).
#Trying to get it my linked list to display when running.
34 messages · Page 1 of 1 (latest)
When your question is answered use !solved or the button below to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
@obtuse bough
Screenshots!
Your message appears to contain screenshots but no code. Please send code and error messages in text instead of screenshots if applicable!
sorry I realy don't get the issue / problem
So I am trying to get the (0, “test”, “again”, 54) above the “pick a list” that’s in the black box but in a linked list with multiple classes. Like it all works except it’s not showing my test of stuff for list.appendNode(pet(0, “test”, “again”, 54) )
Sorry if I am not good at explaining.
Like here is the version with the display forwards it’s all in main. But it’s still not showing.
So you're saying your DoublyList::displayForward() function is not displaying the contents of the node of type Pet that you added via DoublyList::appendNode(T node)?
I feel we are missing way to much context her, what is the functions supposed to do, what actually happens etc
Ya sorry I just was not sure what to send since this code uses 3 classes. The pet class, node class and the one that’s going to do the work/show the lists in main is dobblylist class.
(The green is the tutor trying to help me a few days ago and left me reminders notes.)
So the pet class and the node class are fine as it is just getters and setters basically. But what is shown in the screenshots is the dobblylist.cpp and those public classes are the ones showing in main rn. As I am trying to append a list and put the display forwards but it’s not showing the initial list in main (the black box with the (0, test, again, 54).
please share code as text not as images
Ya it’s not showing in the main.
I kinda forgot how to do that sorry. and with how far apart the append node is to the display I would probably put 2 down and I am really trying not to to confuse people.
but this code doesn't print anything?
How to Format Code on Discord
Markup
```cpp
int main() {}
```
Result
int main() {}
Note: Back-tick (`) not quotes (')
Kinda it just doesn’t show the list but shows the couts like pick a choice
your code as it's now doesn't print anything
@crimson axle It printed out the choice as shown here the black box is my debugger and it doesn’t show the 0, test , again 54 before the orange line 37 quote (it’s long). Like you would see the 0 first before the text but it’s not even in the debugger at all.
wait, are you actually using a debugger or are you calling the console the debugger?
The green arrow up top I press that to get the black box pops up. It’s called (green arrow) Local Window Debugger.
Yeah but no 😅
You are running in debug mode but are not actually using a debugger
https://www.learncpp.com/cpp-tutorial/using-an-integrated-debugger-stepping/
I highly reccomend reading these couple of chapters
Ya I am not good with names but it’s the play/start button. I just call it the green arrow or debugger as it’s by the solid green arrow.
Tho I don’t think that’s going to help make the list.appendNode show in the black box above the pick a choice.
the black box is the console
you should try formatting your questions in a bit of an:
Expected Output:
Actual Output:
This is what I am trying to do
Expected output is just the console itself screen shot
And the output that it’s giving me right now is in the screenshot some showing the code(this screenshot was shown earlier).
what do you mean with?
Expected output is just the console itself screen shot
I am trying to get list.appendNode(pet(0,test,again,54) to get displayed
Because in the first screenshot for me to show you what I was talking about, I just put it in the cout statement and no i can’t put it in a statement like that for my hw. It’s meant to be in a linked list. (I am in a bit of a time crunch and stressed out a bit as it due the next day and it’s just this little bit that’s not working once I get working I can breeze through the rest of it and turn the homework in)
what is the full code? just paste it as text
It is three whole classes+ main. I don’t think it’s possible for me to paste the code because there’s too much there is a text limit.
just paste it as seperate blocks then
1 block for each file
How to Format Code on Discord
Markup
```cpp
int main() {}
```
Result
int main() {}
Note: Back-tick (`) not quotes (')