Forum: C++ 19 Days Ago |
| Replies: 12 Views: 218 Re: sorting dilemma Okay, I got it, worked like a champ. Thanks for the advice, it worked fine. |
Forum: C++ 19 Days Ago |
| Replies: 12 Views: 218 Re: sorting dilemma Here's the spot I'm having trouble with inside the merge sort, I'm not sure what happens inside the statement now
while((indexx < 50) && (indexy < 50) && (indexz < 50))
{
if... |
Forum: C++ 19 Days Ago |
| Replies: 12 Views: 218 Re: sorting dilemma did that already, errors gone. Now how is array z brought into the mix?...other than adding it to the argument list.
Is it compared to x and y as well, or is it somehow compared to bigarray? I'm... |
Forum: C++ 19 Days Ago |
| Replies: 12 Views: 218 Re: sorting dilemma yes, it comes up with y first, then z. It's definitely something I did in merge sort, when I comment it out I get no errors.
here's the merge sort that I messed up
void merge_sort(int x[], int... |
Forum: C++ 19 Days Ago |
| Replies: 12 Views: 218 Re: sorting dilemma Okay, removed k completely, set j to be the index of big array in all three loops.
I no longer get the error for x, only for y and z. The error comes up in a windows dialog box and says
"run time... |
Forum: C++ 19 Days Ago |
| Replies: 12 Views: 218 Re: sorting dilemma altered to match what you posted (for z as well, misunderstood)
Still gives me that error for y and z? |
Forum: C++ 19 Days Ago |
| Replies: 12 Views: 218 Re: sorting dilemma I think I see what you mean with the incrementing i++ for x j++ for y and say k++ for z. I thought it might have something to do with the counts, but I couldn't see where I was off. I didn't think... |
Forum: C++ 19 Days Ago |
| Replies: 12 Views: 218 sorting dilemma I'm doing a lab where I must use three sorting methods, then merge sort the three arrays. While separating the larger array, I'm getting a
"run time check error #2 stack around the variable x was... |
Forum: C++ Aug 28th, 2008 |
| Replies: 2 Views: 155 Re: Data Structures You are correct V, data structures covers all those things. I am currently in a DS class myself and use MS Visual Studio 2005, although now many schools probably use 2008 by now.
I'm not sure how... |
Forum: C++ Aug 28th, 2008 |
| Replies: 6 Views: 316 |
Forum: C++ Aug 28th, 2008 |
| Replies: 6 Views: 316 |
Forum: C++ Aug 28th, 2008 |
| Replies: 6 Views: 316 Re: Deleting from Array Circular Queue The problem may be in my print function as well. I have it printing using the index, so it doesn't print out empty elements. Now I'm trying to delete the front element in the code above, and it... |
Forum: C++ Aug 28th, 2008 |
| Replies: 6 Views: 316 Deleting from Array Circular Queue How do you delete the front cell of an array in an array based circular queue?
Here's the Queue cpp functions
#include <iostream>
#include <string>
#include "Contributor.h"
#include... |
Forum: C++ Aug 28th, 2008 |
| Replies: 10 Views: 344 |
Forum: C++ Aug 28th, 2008 |
| Replies: 19 Views: 671 Re: Linked List Delete Vernon, thank you for your help. I finally figured it out. I was using assignment in a couple places where I meant to be doing comparison/equality |
Forum: C++ Aug 27th, 2008 |
| Replies: 2 Views: 128 |
Forum: C++ Aug 22nd, 2008 |
| Replies: 19 Views: 671 Re: Linked List Delete The list class does indeed do most of the work. All my list manipulation happens there (insert etc)
It is an ordered list, and the insert puts everything in the correct order. With the current... |
Forum: C++ Aug 22nd, 2008 |
| Replies: 19 Views: 671 Re: Linked List Delete so as usual..I overcomplicated it for myself...ookay...try again I guess...lol
do I even need a copy constructor in the node class?
and I took out the references to next in the node class.
to... |
Forum: C++ Aug 22nd, 2008 |
| Replies: 19 Views: 671 Re: Linked List Delete well...yes...all I did was add line 7.
I'm really making a mess of this aren't I? Could that be what's killing the program when it runs?
The more I change, the more lost I get
#include... |
Forum: C++ Aug 22nd, 2008 |
| Replies: 10 Views: 344 |
Forum: C++ Aug 22nd, 2008 |
| Replies: 19 Views: 671 Re: Linked List Delete okay, I made pnext a data member of node, and I corrected all the pNexts and made them pnext.
Now, it will print all the inserts fine, but then the program ends and gives me an error dialog box... |
Forum: C++ Aug 21st, 2008 |
| Replies: 19 Views: 671 Re: Linked List Delete bah...I attached the wrong cpp file. try this one
and it should be asking for ContributorClass.h no space, add a space, whichever...I caught it after I attached it |
Forum: C++ Aug 21st, 2008 |
| Replies: 19 Views: 671 Re: Linked List Delete Vernon,
Here is the code you requested. I would have posted it all, but it seemed like it would be terribly long, so I attached it instead. |
Forum: C++ Aug 21st, 2008 |
| Replies: 19 Views: 671 Re: Linked List Delete My apologies for the formatting in my recent posts. I no longer have an IDE at work and must "troubleshoot" my errors in a text editor until I get home.
Unfortunately, it doesn't hold the... |
Forum: C++ Aug 21st, 2008 |
| Replies: 19 Views: 671 Re: Linked List Delete I commented, as the other code might prove overly long
bool list::del(Contributor Del)
{
Contributor infoIn=Del; //Contributor is the object, infoIn is the specific object
... |
Forum: C++ Aug 21st, 2008 |
| Replies: 19 Views: 671 Linked List Delete I'm having trouble getting my delete function to work for a singly linked list. If I try to delete anything other than the entire list, it deletes everything up to that node.
I know there is... |
Forum: C++ Aug 20th, 2008 |
| Replies: 9 Views: 321 |
Forum: C++ Aug 19th, 2008 |
| Replies: 8 Views: 287 Re: Circle algorithm Post what you have and we'll have a look
...and don't wait so long next time :)
sorry, duplicate post |
Forum: C++ Aug 19th, 2008 |
| Replies: 8 Views: 287 |
Forum: C++ Aug 19th, 2008 |
| Replies: 8 Views: 287 Re: Circle algorithm The above code is a c++ class for a circle. The first part is the header. The functions and data members are declared here in a public or private area of the class declaration.
The second part is... |
Forum: C++ Aug 19th, 2008 |
| Replies: 9 Views: 321 |
Forum: C++ Aug 19th, 2008 |
| Replies: 8 Views: 287 Re: Circle algorithm Tyra,
Folks at this site are more than happy to help. Having said that I have to tell you that they expect an attempt at coding, no matter how basic before they will help. |
Forum: C++ Aug 19th, 2008 |
| Replies: 9 Views: 321 |
Forum: C++ Aug 19th, 2008 |
| Replies: 9 Views: 321 |
Forum: C++ Aug 19th, 2008 |
| Replies: 10 Views: 344 |
Forum: C++ Aug 19th, 2008 |
| Replies: 11 Views: 283 Re: Error -> "Unable to run program file" I have a small question, why do you use the void destroyp function when you have a class destructor that appears to do the same thing?
And not to beat a dead horse as AD is an expert, but I too saw... |
Forum: C++ Aug 19th, 2008 |
| Replies: 10 Views: 344 Re: cirular arrys queue has me running in circles How would you do either or both (enqueue contributor objects or pointers to the contributor objects) I guess would be my question. As a beginner as well, I'm not sure how you would pass either into... |
Forum: C++ Jul 27th, 2008 |
| Replies: 13 Views: 663 Re: Ambiguous Overload Resolution You were right D, he wants us to write an ordered linked list. However, he does not want us to use the template (not yet).
So my thought, for everyone here, not just Duoas, is to take out the... |
Forum: C++ Jul 20th, 2008 |
| Replies: 13 Views: 663 Re: Ambiguous Overload Resolution yes, he's going to make us "roll our own" linked list. This Contributor class is the base class for all the structures we'll cover. That in particular is why I wanted to make sure this class was... |
Forum: C++ Jul 20th, 2008 |
| Replies: 13 Views: 663 Re: Ambiguous Overload Resolution Could the function definition I wrote for "<" (and others) be used to construct an ordered linked list or should it be rewritten somehow to accomodate that use (looking ahead to my next lab)?
It... |