my math quiz program compiles and runs but when I try to type in an answer it freezes...
Can anyone spot an error i'm not seeing?
#include<stdio.h>
#include<stdlib.h>
Type: Posts; User: cjwenigma
my math quiz program compiles and runs but when I try to type in an answer it freezes...
Can anyone spot an error i'm not seeing?
#include<stdio.h>
#include<stdlib.h>
Actually I just figured it out! ( : ..amazing how you can really have a brain meltdown and forget everything!!!!
So I figured out how to make my queue hold the name and show it.. but how can I get it to keep the ID with the name in the queue?
if(option == 1){
cout<<"Please Enter Student's...
Well with my enqueue and dequeue aka add and delete students I can't figure out how you can keep track of the student and the id with the same queue then show it.
I'm building a simple student database with pointers and basically a queue. I'm having trouble putting it together as I'd like to keep track of their name and ID..Here's my code thus far..
...
Sorry, I'm just having a hard time understanding asymptotic notation. I'll figure it out..... thanks for trying to help me.
wow that really helped me! Thanks alot.. This might be a dumb question but how many steps would it take to perform the peek operation?
so would the time be constant? Big O(n)??
hmm... I don't understand
ah..see what you mean. If I added an operation called peek that would look at the next item below the top of the stack... wouldn't that add more steps? How would you figure out the asymptotic time...
I wrote the push and pop operations for my stack. I'm trying to figure out what the worst case time complextiy is using asymptotic notation for these two operations is......i'm guessing Big O(log...
I see what you mean sorta...I'm not that great at asymptotic notation
I'm not sure how you figure out which one it is... This stuff is new to me.
I do know some basics..
O(1) “constant”...
Let's say I had a priority queue, Q, I'm trying to write an alogorithm that will implement the enqueue operation.
here is my enqueue...
void queue::enqueue(int number, int priority) {
...
wow thanks a bunch..i couldn't find that tiny little error!!!!
I get these errors..
In member function `void stack::push(int)':
onetwo.cpp:29: error: parse error before `}' token
onetwo.cpp: At global scope:
onetwo.cpp:31: error: `size' was not declared...
I keep getting errors in my code and I can't seem to fix it. Any Idea what it could be?
#include<iostream>
using namespace std;
class stack{
private:
haha... Thanks for the help guys. Yeah I left an extra semicolon there....
ok so i figured some more stuff out. I can't seem to get my dequeue working though. I need to also figure out how to show the queue.
#include<iostream>
using namespace std;
class qNode{...
Are there any simple Linked lists "examples" out there that you can enqueue, dequeue and print. I'm getting confused with my pointers and I wanted to see how you can actually implement this Linked...
I'm trying to create a menu style enqueue and dequeue with pointers. I have this so far I want to use the left and right pointers to lets say dequeue a number. I also thought about using two temps....
Here is my priority queue.. I can't seem to get my enqueue and dequeue to work quite right. The enqueue will work to a certain extent but still isn't that great. Any suggestions?
...
Wow looks like some awesome coding thanks for the help. The only thing is I haven't made it that far to templates and pointers. So I can't understand the code all that much. I'm still in the learning...
Ok so basically the beercanbliltz attack is supposed to double all the senior opponents attack power and can only be used once. I also want seniors health to decrement by 25 when he uses it. I...
So I could just decrement beercanblitz?
else if(enemyAttack == 5){
f1.reduceHealth(f5.beercanblitz(f5.punch()));
f1.reduceHealth(f5.beercanblitz(f5.kick()));
...
thanks for the help!!