Altered the code thanks to assistance on another forum. Still doesn't work but it's one step closer.
Changed the code again. Problem still exists but it's starting to clear away.
#include...
Type: Posts; User: penance
Altered the code thanks to assistance on another forum. Still doesn't work but it's one step closer.
Changed the code again. Problem still exists but it's starting to clear away.
#include...
Thanks. That didn't solve the problem but that would've been a problem down the road.
On the subject of result, I'm only going by what my compiler told me to do and the syntax that I've read in my notes. Result is supposed to be pointing to the result stack that I declared at the...
Well that's interesting. How'd I miss that?
Hello, I am creating a program to add and multiply large numbers using stacks. I have been working on the program all day and I believe I am on the verge of completing it, but right now the addition...
Now see, my problem was that I didn't think to put all that at the beginning instead of the end. That makes a lot more sense. Brian, you're a lifesaver. Thank you so much for your assistance.
Well, I just solved my second problem. Turns out I never supplied a case for if a node didn't have a left or right branch, which is why it didn't work when I tried to delete all the nodes. I was...
Hello, I am currently working on a binary search tree that acts as a phone book. I am nearly completed with it and all functions seem to work properly except in two cases:
An error message will...
Oh holy ........, I figured it out. I never set each node's reference value equal to anything. I changed the addnode function so that it no longer takes in a reference value, it assigns the value to...
Well, what you said really helped because I realized my calcindex function was totally wrong, as the formula called for all letters to be multiplied by 3, all numbers by 5, both totals added...
I ran the debugger and it says "Unhandled exception in program.exe: 0xC0000005: Access Violation."
I don't know what that means.
And then it points to this line:
strarray[index] =...
I wasn't asking for all my problems to be solved, and I'm sorry if I sounded that way. I am trying to solve it on my end. I'm just asking for help, which doesn't necessarily ask for a solution, just...
Actually, yeah, Prelude, I have been weaned on Java so to speak. I'm taking classes in both languages at the same time (out of necessity, not desire) so I guess I've gotten a little scatterbrained.
...
Hey, it's me again. Sorry to be such a bother but this should be the last time for a little while, I assure you.
The program I've been working on the past week or so is a hash table, using an...
Wait, does that work for when numbers are part of the string too, or am I going to have to do something extra for that?
What exactly does the "string[i] - 'A' + 1 do?
EDIT: Oh never mind, ASCII code. Figured it out. Thanks, that is easy. Now to go bash my head into a wall for not figuring that out on my own. I am...
This is probably so easy I could slap myself, but I can't figure out how to do this and it is necessary for a larger program I am building. Assuming that each letter in the alphabet is represented by...
Never mind, I solved the problem myself. It turned out that the solution was to do this:
#include <stdio.h>
int NumberofPartitions (int *set, int size, int result, int parts);
int main ()...
So, anyone want to take a shot at it? I'm still trying variations. Any help would be appreciated.
Well, I'm not sure if it needs a return statement in the other cases. See NumberOfPartitions is supposed to be a recursive function.
For example, let's say the array given by the user is 1, 3, 4,...
Hello. I am trying to write a recursive program that will check partitions of an array to see if they add up to a certain number. A person gives the target number, the length of the array, and the...