Stacks help

Pages: 1234
cblack618 is a liar and a cheat.
Do not help him.

* this is an automated response
I thought the purpose of the "edit and run" function built in on was for someone to see whether the code i posted compiles or what errors popped up ? versuses listing them all invidually

You're the one looking for other people to freely give up their time and effort to help you. The onus is on you to do as much of the work as possible, rather than dumping it on us.

If you're getting lots and lots of errors, you'll often find that most of them are follow-on consequences of the first error. Look at the first error message. Look it what it's telling you, which will include the line number if the line causing the error. Understand what that error message is telling you, and try and fix the problem.

Then, once you've fixed it, recompile your code, and see which others still remain.

Then, repeat as necessary.

EDIT: And, seriously, fix your indentation. The easier your code is to read and understand, the easier you will spot your problems, and the more likely it is other people will take the effort to look at your code to help fix the ones you don't spot.
Last edited on
Mike, if things were that easy for me to do why would i be here looking for help ? think about that. I've looked at the errors and don't know how to fix them. Reason I am here seeking help
cblack618 is a liar and a cheat.
Do not help him.

* this is an automated response
Look it the first error in your code, at line 14:

 In constructor 'isBalanced::isBalanced()':
14:9: error: 'newString' was not declared in this scope

Isn't that obvious? You have a thing in your code at that line called newString, but you haven't declared that anywhere. You do understand that you need to declare variables with a type, yes? Of course you do, because you're already doing that elsewhere in your code.

Also, fix your indentation.
i just declared it with

 
string newString;


but that didnt fix that error
What is newString supposed to be? What is line 14 supposed to be doing?
Last edited on
Tutorial on allocating dynamic memory: http://www.cplusplus.com/doc/tutorial/dynamic/

Seriously, you should take the time to learn from the ground up.
Forget the actual assignment, just make a simple tutorial program for yourself that allocates and deletes a dynamic array. Then, start to add bells and whistles on to that.
Last edited on
Checking back in I see another heroic attempt is in progress.
So be it.
*sigh*
I am in a college course. I don't have to pause my actual assignment which are due on a weekly basis. to soley take time to learn every concept from the ground up. I have to try to learn things on the fly.

If i were doing this as leisure, then yes I should learn from the ground up. But the teacher won't postopone my assignment due dates while i catch up
Mikey,,

I am purely guessing with line 14. I thought i needed something to hold a string. the reason i put that. no logic behind me putting that. I am a pure beginner as far as my knowledge of c++
dutch goddamnit I can't help it.

"I don't have time to pause my actual assignment" and yet you've wasted so much time on these forums.
Cause I am on thes forums trying to get help with my assignment. I'm not on here trying to go over A-Z of C++ principles. I will have to do that in the future
Man this is like learned helplessness like I've never seen before.
I am purely guessing with line 14. I thought i needed something to hold a string.

So why did you declare arr as a string*? What is newString supposed to be? Where is it supposed to come from? Why are you only interested in the value of its 30th element?

I have to try to learn things on the fly.

By "try to learn things on the fly", do you mean "copy code other people give me, so that I can deceive my college into thinking I've learnt the things I'm supposed to learn, even though I actually haven't"?

At some point, you're going to be asked to sit down and demonstrate that you understand this stuff well enough to be able to write a program without the benefit of being able to ask someone to tell you what to write. That's why taking the time to learn this stuff and understand it is exactly what you should be doing write now, so that when that time comes, you know what to do.
Last edited on
well go someplace else then
Mikey,

That stuff is that way on line 14 because i am guessing. When i post nothing, you all say "Well at least try something". So I am giving you what I tried. I don't know what I am doing
It will just keep pushing until you give it the code.
But you must have had a reason for writing that. Yoiu must have had something you intended that line to do.

You must have had some reason for having a class member called arr, and declaring it as a string*, yes?

You must have had some reason for thinking you needed to assign a value to it in the constructor, yes?

You must have had a reason for thinking that the value you needed to assign to it was something called newString[30], yes?

Saying "I was just guessing" over and over again is meaningless nonsense. You had something you intended that line to do. Why are you being so coy about it?

Is it because you didn't write that line at all? That someone else wrote it, and you've copied it?
why do you keep taking the time to comment on my post except for the purposes to harass and spam ? go do something else and leave me alone. I am trying to get help and you are just bringing negatvity
Pages: 1234