Search:

Type: Posts; User: cjwenigma

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,246

    Help with Program

    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>
  2. Thread: Pointers

    by cjwenigma
    Replies
    4
    Views
    934

    Actually I just figured it out! ( : ..amazing...

    Actually I just figured it out! ( : ..amazing how you can really have a brain meltdown and forget everything!!!!
  3. Thread: Pointers

    by cjwenigma
    Replies
    4
    Views
    934

    So I figured out how to make my queue hold the...

    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...
  4. Thread: Pointers

    by cjwenigma
    Replies
    4
    Views
    934

    Well with my enqueue and dequeue aka add and...

    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.
  5. Thread: Pointers

    by cjwenigma
    Replies
    4
    Views
    934

    Pointers

    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..



    ...
  6. Replies
    6
    Views
    2,783

    Sorry, I'm just having a hard time understanding...

    Sorry, I'm just having a hard time understanding asymptotic notation. I'll figure it out..... thanks for trying to help me.
  7. Replies
    8
    Views
    1,194

    wow that really helped me! Thanks alot.. This...

    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?
  8. Replies
    6
    Views
    2,783

    so would the time be constant? Big O(n)??

    so would the time be constant? Big O(n)??
  9. Replies
    8
    Views
    1,194

    hmm... I don't understand

    hmm... I don't understand
  10. Replies
    8
    Views
    1,194

    ah..see what you mean. If I added an operation...

    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...
  11. Replies
    8
    Views
    1,194

    Stacks and 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...
  12. Replies
    6
    Views
    2,783

    I see what you mean sorta...I'm not that great at...

    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”...
  13. Replies
    6
    Views
    2,783

    Priority queue

    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) {
    ...
  14. Replies
    4
    Views
    915

    wow thanks a bunch..i couldn't find that tiny...

    wow thanks a bunch..i couldn't find that tiny little error!!!!
  15. Replies
    4
    Views
    915

    I get these errors.. In member function `void...

    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...
  16. Replies
    4
    Views
    915

    Help with a stack

    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:
  17. Replies
    8
    Views
    7,513

    haha... Thanks for the help guys. Yeah I left an...

    haha... Thanks for the help guys. Yeah I left an extra semicolon there....
  18. Replies
    8
    Views
    7,513

    ok so i figured some more stuff out. I can't seem...

    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{...
  19. Replies
    8
    Views
    7,513

    Are there any simple Linked lists "examples" out...

    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...
  20. Replies
    8
    Views
    7,513

    enqueue and dequeue pointer

    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....
  21. Replies
    6
    Views
    3,181

    Priority Queue Help

    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?



    ...
  22. Replies
    10
    Views
    1,092

    Wow looks like some awesome coding thanks for the...

    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...
  23. Replies
    10
    Views
    1,092

    Ok so basically the beercanbliltz attack is...

    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...
  24. Replies
    10
    Views
    1,092

    So I could just decrement beercanblitz? ...

    So I could just decrement beercanblitz?




    else if(enemyAttack == 5){
    f1.reduceHealth(f5.beercanblitz(f5.punch()));
    f1.reduceHealth(f5.beercanblitz(f5.kick()));
    ...
  25. Replies
    10
    Views
    1,092

    thanks for the help!!

    thanks for the help!!
Results 1 to 25 of 46
Page 1 of 2 1 2