User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
DaniWeb is a massive community of 423,586 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,367 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Showing results 1 to 40 of 226
Search took 0.02 seconds.
Posts Made By: henpecked1
Forum: C++ 19 Days Ago
Replies: 12
Views: 218
Posted By henpecked1
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
Posted By henpecked1
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
Posted By henpecked1
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
Posted By henpecked1
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
Posted By henpecked1
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
Posted By henpecked1
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
Posted By henpecked1
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
Posted By henpecked1
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
Posted By henpecked1
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
Posted By henpecked1
Re: Deleting from Array Circular Queue

Thanks for the heads up Vernon. BTW I figured out the linked list thing thanks to your tips on the node class and how data was being passed in.
Forum: C++ Aug 28th, 2008
Replies: 6
Views: 316
Posted By henpecked1
Re: Deleting from Array Circular Queue

okay, I understand most of what you've done, what does including the windows.h file give me? I've never used it before
Forum: C++ Aug 28th, 2008
Replies: 6
Views: 316
Posted By henpecked1
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
Posted By henpecked1
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
Posted By henpecked1
Re: cirular arrys queue has me running in circles

Phil,

I have your queue stuff all figured out except for one thing, and I'll post that as a separate question.
Forum: C++ Aug 28th, 2008
Replies: 19
Views: 671
Posted By henpecked1
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
Posted By henpecked1
Re: trying to print my Queue

Now mark your post as solved...lol.
Forum: C++ Aug 22nd, 2008
Replies: 19
Views: 671
Posted By henpecked1
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
Posted By henpecked1
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
Posted By henpecked1
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
Posted By henpecked1
Re: cirular arrys queue has me running in circles

got the overloaded = function fixed, but still not sure how to pass the contributor object into the enqueue function
Forum: C++ Aug 22nd, 2008
Replies: 19
Views: 671
Posted By henpecked1
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
Posted By henpecked1
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
Posted By henpecked1
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
Posted By henpecked1
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
Posted By henpecked1
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
Posted By henpecked1
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
Posted By henpecked1
Re: CMD closes after executing the program as intended.

Thanks Vernon, education appreciated
Forum: C++ Aug 19th, 2008
Replies: 8
Views: 287
Posted By henpecked1
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
Posted By henpecked1
Re: Circle algorithm

Post what you have and we'll have a look
Forum: C++ Aug 19th, 2008
Replies: 8
Views: 287
Posted By henpecked1
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
Posted By henpecked1
Re: CMD closes after executing the program as intended.

If you're just capturing output, I don't think it matters which way you do it, as far as the user is concerned, see below :)

Pausing the program and providing a graceful exit for the user is...
Forum: C++ Aug 19th, 2008
Replies: 8
Views: 287
Posted By henpecked1
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
Posted By henpecked1
Re: CMD closes after executing the program as intended.

I meant I'm still new to programming c++ :)



system ("PAUSE");



you can always remove it later, it's just a way to capture your output
Forum: C++ Aug 19th, 2008
Replies: 9
Views: 321
Posted By henpecked1
Re: CMD closes after executing the program as intended.

two things you can do from a newbie point of view

a) if you're using MS Visual Studio, try the menu option "Start without Debug" which will leave the screen up after the program finishes until you...
Forum: C++ Aug 19th, 2008
Replies: 10
Views: 344
Posted By henpecked1
Re: cirular arrys queue has me running in circles

Also, how do you declare the array if you want it to be an array of Contributors?
Forum: C++ Aug 19th, 2008
Replies: 11
Views: 283
Posted By henpecked1
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
Posted By henpecked1
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
Posted By henpecked1
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
Posted By henpecked1
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
Posted By henpecked1
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...
Showing results 1 to 40 of 226

 
All times are GMT -4. The time now is 7:52 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC