Search:

Type: Posts; User: jturner38

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    10
    Views
    875

    ok I tried this but this does nothing. So is...

    ok I tried this but this does nothing. So is there any suggestions?



    int main(){

    Lstack S;
    string s;
    float a = 0;
    char b = 0;
  2. Replies
    5
    Views
    1,083

    What are you talking bout? All I did is post my...

    What are you talking bout? All I did is post my instructions Im suppose to follow. Since I could not find the original posting I was looking for so I reposted it.
  3. Replies
    5
    Views
    1,083

    I didnt think that I couldnt find my original...

    I didnt think that I couldnt find my original post so I just reposted this. What do you mean by subtract '0' from a character?
  4. Replies
    5
    Views
    1,083

    converting to float

    Write a program in C++ that evaluates portfix strings (one per line in a text file) with the following restrictions on the input: Each character is either an operand- if it is a digit and the...
  5. Replies
    9
    Views
    1,263

    I got it finally. Here my final code if anybody...

    I got it finally. Here my final code if anybody wants to check it out:


    #include <iostream>
    #include <string>
    using namespace std;


    const int DefaultListSize = 50;
    typedef char Elem;
  6. Thread: Palindrome

    by jturner38
    Replies
    4
    Views
    1,702

    I finally got it! Here's my final code if anybody...

    I finally got it! Here's my final code if anybody wants to see it.


    #include<iostream>
    #include<string>
    #include<ctype.h>
    using namespace std;

    const int DefaultListSize = 50;
    typedef char...
  7. Replies
    4
    Views
    1,140

    The worst case would be something happens to n, n...

    The worst case would be something happens to n, n number of times!
  8. Replies
    4
    Views
    1,140

    Asymptotic estimate

    Im suppose to give the asymptotic estimate (that is the most precise) for the number of steps as a function of n. Assum the worst case data! I know what this program does but I have no idea how to...
  9. Replies
    10
    Views
    875

    ok so I need to add something somewhere that...

    ok so I need to add something somewhere that converts the character into a number is that correct? Or is it something Im doin wrong with like in post #4 where Im pushing a character and not a number?
  10. Replies
    10
    Views
    875

    Ok well I changed it to this: ...

    Ok well I changed it to this:


    S.push(s.at(i));


    But now here is whats weird. If you use subtraction the value comes out correct but if you use any other operator you wont get the right value.
  11. Replies
    10
    Views
    875

    So you are saying I need an if statement?

    So you are saying I need an if statement?
  12. Replies
    10
    Views
    875

    what could the problem be?

    Ok when I run my program I test 23+. It suppose to be converted to 2+3 and the answer should be 5. But when I run it it gives me the answer 2. Im not sure what the problem is. Ive use the debugger...
  13. Replies
    10
    Views
    1,071

    ok I did that but I still get 0 for my answers....

    ok I did that but I still get 0 for my answers. Here's my main program:



    int main(){

    Lstack S;
    string s;
    float a = 0;
    char b = 0;
  14. Replies
    10
    Views
    1,071

    ok so could I instead assign b to any of the 5...

    ok so could I instead assign b to any of the 5 operators then and take out my bool operator?
  15. Replies
    10
    Views
    1,071

    Eval(a, b, c); S.push(Eval(a, b, c));...

    Eval(a, b, c);
    S.push(Eval(a, b, c));


    I tried this but I still get 0.
  16. Replies
    10
    Views
    1,071

    The program should convert 23+ to 2+3 and the...

    The program should convert 23+ to 2+3 and the same with 42-, it should become 4-2.
  17. Replies
    10
    Views
    1,071

    oh ok! That makes sense. Now My program runs but...

    oh ok! That makes sense. Now My program runs but when I input any postfix strings I keep getting 0. Like I entered 23+ the first time and it return 0. Then I tried 42- and it return 0 as well.
  18. Replies
    10
    Views
    1,071

    What do I push onto the stack?

    Write a program in C++ that evaluates portfix strings (one per line in a text file) with the following restrictions on the input: Each character is either an operand- if it is a digit and the...
  19. Thread: Palindrome

    by jturner38
    Replies
    1
    Views
    787

    Palindrome

    My code builds but it doesnt do anything. I think I have two things wrong with my code and Im stuck on how to fix these. I think the first one is I may not be reading my string as a char correctly...
  20. Replies
    5
    Views
    870

    The 4 functions are the Opener, Closer, push, and...

    The 4 functions are the Opener, Closer, push, and pop. Thats bc I havent put a variable in yet. But when I do it says that they are unintialized local variables. Which Im confused about.
    Here is...
  21. Replies
    5
    Views
    870

    intializing variables

    Here's par of my code:


    bool Opener(char ch){
    if((ch == '(') || (ch =='[') || (ch =='{'))
    return true;
    else
    return false;
    }/*end of opener*/
  22. Thread: Palindrome

    by jturner38
    Replies
    4
    Views
    1,702

    I still dont see whats wrong with that. I want to...

    I still dont see whats wrong with that. I want to compare the top value in the stack with the front value in the Queue bc if they are the same then I should pop them then repeat. Or should I pop them...
  23. Replies
    1
    Views
    711

    Binary Search Tree

    For my project 4 I have to build a Binary Search Tree using Inorder Traversal. I know what it does but I dont know how to go about creating a code for one. This is what I got so far:

    ...
  24. Thread: Palindrome

    by jturner38
    Replies
    4
    Views
    1,702

    Palindrome

    Write a program that uses both a Stack and a Queue to determine if a number of lines in Text File are packed palindromes or not. A packed palindrome is a sequence of characters with the property: If...
  25. Thread: strings

    by jturner38
    Replies
    3
    Views
    859

    Koders Code Search: Lcd.h - C++ - GPL...

    Koders Code Search: Lcd.h - C++ - GPL
Results 1 to 25 of 99
Page 1 of 4 1 2 3 4