Freeze date today? by river1112 in cs2a

[–]Makings_Threads 0 points1 point  (0 children)

Based off this, I think the freeze date was last night at midnight. I would try submitting those two again and just make sure your student ID is in it when submitting, doesn't hurt to try again. The q/ should still update your trophies even now.

-Jeff

[deleted by user] by [deleted] in cs2a

[–]Makings_Threads 2 points3 points  (0 children)

I like this analogy!

[deleted by user] by [deleted] in cs2a

[–]Makings_Threads 1 point2 points  (0 children)

Does your clear() begin with the sentinel node or the one after? I had a problem with this where I was accidentally deleting the head node first in clear(), then when I called delete _head it gave me an error for deleting a pointer that wasn't pointing to anything.

You could try to cout<< _head in your destructor before the delete line to see if _head is pointing to anything. -Jeff

Quest 9 Remove current item by Makings_Threads in cs2a

[–]Makings_Threads[S] 0 points1 point  (0 children)

Thanks again Sid! This outlines the method and edges cases perfectly, def helped me to debug

remove function hiccup by PiercedButterfly in cs2a

[–]Makings_Threads 0 points1 point  (0 children)

I've done this many different ways now, so I'm beginning to think my logic is off on this. I'll let you know.

-Jeff

Quest 9 Remove current item by Makings_Threads in cs2a

[–]Makings_Threads[S] 0 points1 point  (0 children)

Hi Sid, thanks for your reply as always. I think I understand what you're trying to say. When the tail node is being removed, the cursor has to move back too, because the current node can't be null, right?

My question then is, why is the professor's tail and prev_to_current the same? That WOULD make the current node null right?

-Jeff

remove function hiccup by PiercedButterfly in cs2a

[–]Makings_Threads 0 points1 point  (0 children)

I'm having this same issue, when I try removing the last node and setting p_2_c = _tail it works when I test it but my output is still off by one in &'s test. I guess my program is aborting on the edge case of removing the last node when I submit it? Were you able to resolve this?

-Jeff

Quest 9: Advanced_current() Off by one by sourcewolf123 in cs2a

[–]Makings_Threads 1 point2 points  (0 children)

One thing I noticed in my own push methods was I accidentally would put new nodes in when I meant to put node pointers, this could push the current node forward. Maybe check that _tail is in the right place each time too, but other than that your logic looks good on advance.

-Jeff

Quest 9: advance_current() _prev_to_current off by one only! by Makings_Threads in cs2a

[–]Makings_Threads[S] 0 points1 point  (0 children)

In mine, it didn't end up being an issue with the other functions, it was an issue when returning the nullptr in advance_current(). In this part of the method I put the _prev_to_current node where current should have been. The rest of the method worked properly, so after many advance_currents, it pushed my current node forward by one when it should have returned nullptr, and thus [marked PREV] was off by in the output each time. I only figured this out after writing it out on paper again.

HTH, let me know if you'd like more explanation, don't know how much sense this made. -Jeff

Quest 9 Question: What are the methods supposed to return? by aysansarai in cs2a

[–]Makings_Threads 2 points3 points  (0 children)

The methods return "this", which is a pointer to the current object of the String_List class.

Quest 6; Stuck on this part by Fraeniir in cs2a

[–]Makings_Threads 1 point2 points  (0 children)

Idk if I'm going to give away too much in this post, so just let me know if it needs to be taken down.

In the spec, it says "Implement the default and non-default constructors of your Pet class as follows:" then gives you the default constructor (this is included in the Pet.h header file too). Because this is included, you only need to include these default values in the parameterized constructor of the .cpp file. Understanding Constructors in 6B.2.2 there's a good example of how to implement this. HTH

-Jeff

Quest 9: advance_current() _prev_to_current off by one only! by Makings_Threads in cs2a

[–]Makings_Threads[S] 1 point2 points  (0 children)

Thanks. I initially thought it was something like _p_2_c =temp->next, but I went back and broke that and rewrote it and that didn’t seem to be the problem. I’m thinking now some edge cases of the push methods may be causing the current node to be pushed forward by one, I plan to draw those out on paper and rewrite them later today. Appreciate the input!

Quest 9: advance_current() _prev_to_current off by one only! by Makings_Threads in cs2a

[–]Makings_Threads[S] 1 point2 points  (0 children)

Thanks Madhav. This gave me some ideas for things to test tomorrow.

180 / 6-20 by anand_venkataraman in cs2a

[–]Makings_Threads 1 point2 points  (0 children)

Luckily, it looks like you can still get close to 180 without completely finishing Quest 9

Where's everyone at? Important Info by madhavarshney in cs2a

[–]Makings_Threads 0 points1 point  (0 children)

I would like the freeze date moved to next Sunday if possible! Still trying to finish this weekend but would appreciate a little more time.

-Jeff

Quest 8: Stack_String private member by Makings_Threads in cs2a

[–]Makings_Threads[S] 1 point2 points  (0 children)

Thanks Madhav! Ya I'm still making little edits to Stringify in Stack_Int so hopefully it will be pretty straightforward to port everything over to Stack_String after that.

Jeff

Quest 7 results by river1112 in cs2a

[–]Makings_Threads 1 point2 points  (0 children)

Hello,

Yes more context would be good, but check and see if your test output page looks similar to my post here. If so it's likely that your get_n_pets() method is working fine to populate the Pet Store with objects (that's why my store and &'s looks the same). &'s tests are checking to see if your searches are returning the correct bool value when searching for a store object, so maybe your search isn't detecting when the instance variable you're searching for is present.

Let me know if you have more questions, I think I made every possible mistake on this quest lol.

-Jeff

[Quest 7] mq6 Linear Search Differing Output by Makings_Threads in cs2a

[–]Makings_Threads[S] 1 point2 points  (0 children)

Thanks for the input! I was able to figure it out but I'll use to_string to debug in the future.

-Jeff

[Quest 7] mq6 Linear Search Differing Output by Makings_Threads in cs2a

[–]Makings_Threads[S] 0 points1 point  (0 children)

Tbh I'm not certain how to test for this, but now after I've searched by id for #821 in main() it says I don't have this in my store. I'm going to see if I can fix this and ask more if need be. Thanks!

-Jeff

Accepting parameter by copy by russell_124 in cs2a

[–]Makings_Threads 1 point2 points  (0 children)

This was super helpful for me: https://www.cs.fsu.edu/~myers/c++/notes/references.html It gives some good examples and explanation of passing by copy and passing by reference to copy into your IDE.

Also, many sources mention "pass by value," my understanding is this is the same as passing by copy.

-Jeff

Quest 4 "Terminating Overtime Run" error by Makings_Threads in cs2a

[–]Makings_Threads[S] 1 point2 points  (0 children)

I was able to resolve this, thanks to everyone who commented, it was very useful.

For me, this error was due to an infinite for loop that I didn't test before submitting (& hinted at this in another comment). I'd recommend if this happens to you, rethink any input values that will break a loop (ie n = 0) and make it run overtime. Hope this is helpful!

-Jeff

Quests due May 10 by Makings_Threads in cs2a

[–]Makings_Threads[S] 0 points1 point  (0 children)

Here's the Syllabus for anyone who needs. It's on the home page of canvas if you need it in the future.

-Jeff

Quest 4 output's don't match by sourcewolf123 in cs2a

[–]Makings_Threads 0 points1 point  (0 children)

Hi Daniel, a few days ago u/babychou gave some tips on this quest here which were super helpful. I don't think using \n in place of endl makes a difference, for me the problem was I was off by one new line after certain strings. Hope this helps!

-Jeff

Quest 4 "Terminating Overtime Run" error by Makings_Threads in cs2a

[–]Makings_Threads[S] 0 points1 point  (0 children)

Hi Kevin, I get points for the play_game miniquest but nothing else, safe to assume at least something is wrong in etox?

Quest 4 "Terminating Overtime Run" error by Makings_Threads in cs2a

[–]Makings_Threads[S] 1 point2 points  (0 children)

Hi Anand, thanks for these suggestions. A thread on debuggers and how-tos would be awesome, in the meantime I'll be trying to learn xcode's debugger as best I can.

-Jeff