Search:

Type: Posts; User: webren

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    10
    Views
    1,211

    No, you don't need to know C to learn C++. C++...

    No, you don't need to know C to learn C++. C++ is derived from C with a lot more features and capabilities.
  2. Replies
    15
    Views
    2,244

    float operator/(int x, const percent& y) {...

    float operator/(int x, const percent& y)
    {
    float a, b;
    percent e;

    a = e.getpercent();
    b = a / y;

    return b;
    }
  3. Replies
    15
    Views
    2,244

    Isn't that a flaw in my program that the function...

    Isn't that a flaw in my program that the function to multiply a number by a percent relies on the function to multiply a percent by a number?

    Also, I try to call getpercent() in my second...
  4. Replies
    15
    Views
    2,244

    So the function that returns y * x depends on the...

    So the function that returns y * x depends on the other operator* function (the one that multiplies the percent by a number)? If this is so, is it because that function has a base case?

    How would...
  5. Replies
    15
    Views
    2,244

    Thanks Thantos. 7stud, I understand a little...

    Thanks Thantos.

    7stud, I understand a little better now. Thank you. Using Thantos's advice (but changing some things around to get rid of errors), I got my program working, but I am confused...
  6. Replies
    15
    Views
    2,244

    I am a little confused. percent operator* (int,...

    I am a little confused.
    percent operator* (int, const percent&);

    Why isn't there a variable name after int and percent&?
    I understand you don't have to have any, but how would you manipulate...
  7. Replies
    15
    Views
    2,244

    What would the function need to look like to be...

    What would the function need to look like to be able to do c = a * f?
  8. Replies
    15
    Views
    2,244

    Error when overloading...

    I keep receiving this error when trying to overload the * operator to multiply an object by an integer:

    " error C2677: binary '*' : no global operator defined which takes type 'class percent' (or...
  9. Replies
    3
    Views
    1,299

    I finished studying recursion and was wondering. ...

    I finished studying recursion and was wondering. I definitely wouldn't limit myself to one or the other, but I was curious.

    Thanks for the replies.
  10. Replies
    3
    Views
    1,299

    Languages - Recursion/Iteration

    I was wondering if anyone knew of any programming languages that only allowed iteration and not recursion, and of any programming languages that allow only recursion and not iteration.
  11. Replies
    4
    Views
    3,578

    Ah, thanks for helping me recognize the problem. ...

    Ah, thanks for helping me recognize the problem. I actually never compiled the code. Maybe that's bad practice-I don't know. I just typed it all up, compiled it and eventually got rid of all the...
  12. Replies
    4
    Views
    3,578

    Program using classes - keeps crashing

    Hello,
    I wrote a program using classes to get myself more familar with OOP. I got my program error free, but whenever I run the code, the program crashes. Any hints on why would be greatly...
  13. Replies
    4
    Views
    1,144

    Since the function is supposed to return a...

    Since the function is supposed to return a boolean value, whatever you want to return needs to have "return" in front of it. So just like The Brain said, and as you already realized, you need the...
  14. Replies
    3
    Views
    1,133

    Class problem...

    Hello,
    I am trying to write a program that will simply output the sum and product of complex numbers. I am having a difficult time getting it to work properly. Any ideas would be appreciated. ...
  15. Replies
    3
    Views
    1,022

    Ah, stupid mistake. Thanks.

    Ah, stupid mistake. Thanks.
  16. Replies
    3
    Views
    1,022

    Error Linking...

    Does anyone know how to get rid of this error and where it comes from?

    LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
    Debug/Programming_Project_2.exe : fatal error...
  17. Thread: Crashing...

    by webren
    Replies
    3
    Views
    1,013

    The first while loop is there so if the user...

    The first while loop is there so if the user enters a zero, I want the program to end. If you want my entire coding, here it is:


    #include <iostream>
    #include <string>
    #include <cctype>
    ...
  18. Thread: Crashing...

    by webren
    Replies
    3
    Views
    1,013

    Crashing...

    Hello,
    I have created a basic palinedrome program that works fine when obtaining words using commands like
    cin >> input;, but I would like to elaborate and gets full sentences as inputs. I...
  19. Thread: Strings

    by webren
    Replies
    1
    Views
    804

    Pretty much got it working. The problem was the...

    Pretty much got it working. The problem was the front not being initalized to zero when a new word would be entered.

    For the discarding whitespaces, I'm sure there is an isspace command.
  20. Thread: Strings

    by webren
    Replies
    1
    Views
    804

    Strings

    Hello,
    What I am trying to do is create the classic palindrome detection program. I am having quite some trouble to get it working properly. The problems I am having are:

    1) Whenever a string...
  21. Replies
    6
    Views
    1,655

    Ah, good call. Thanks for the advice, tripper. ...

    Ah, good call. Thanks for the advice, tripper.

    Also, thanks for all your help, Mr. Wizard.
  22. Replies
    6
    Views
    1,655

    Ah, okay it works now. Having the if statements...

    Ah, okay it works now. Having the if statements the way they are aren't going to cause bugs in the program, will they?

    How can I do some checking for the first character being capitalized or not?...
  23. Replies
    6
    Views
    1,655

    I re-wrote the program like this and it's working...

    I re-wrote the program like this and it's working a lot better than the previous one. Instead of states, I used colors. The only problem now is that you can enter every color, but none of them will...
  24. Replies
    6
    Views
    1,655

    Guessing Program

    The program listed below lets a user input a state, and the program tells the user if that is the state that the program randomly picked (from the enumeration block)...but I'm having a hard time...
  25. Thread: Enumeration

    by webren
    Replies
    5
    Views
    1,197

    This is what I have so far. I think I'm in the...

    This is what I have so far. I think I'm in the ballpark, but not fully there yet. Any ideas would be great.


    #include <iostream>
    #include <string>
    #include <stdlib.h>
    #include <time.h>
    ...
Results 1 to 25 of 37
Page 1 of 2 1 2