Search:

Type: Posts; User: QuietWhistler

Search: Search took 0.00 seconds.

  1. Replies
    13
    Views
    2,359

    Well an if/else statement looks like this: ...

    Well an if/else statement looks like this:



    if( expression )
    {
    // do this
    } else {
    // do this
    }
  2. Replies
    13
    Views
    2,040

    Do you get any warnings? If you leave...

    Do you get any warnings? If you leave clearBuffer() out, does it work then ?
  3. Replies
    13
    Views
    2,040

    What are you using for displaying the string ?...

    What are you using for displaying the string ? cout, printf() or what?
  4. Replies
    13
    Views
    2,040

    What do you mean ? Is ProductDesc empty after you...

    What do you mean ? Is ProductDesc empty after you called getline() ?

    Try pressing enter again after your input.

    --Shady
  5. Replies
    13
    Views
    2,040

    You have to clear the buffer after you use...

    You have to clear the buffer after you use getline() like this:



    void clearBuffer
    {
    string temp;
    getline(cin, temp);
    }
  6. Replies
    6
    Views
    1,102

    This might be an incomplete answer, but I'll try...

    This might be an incomplete answer, but I'll try anyway.

    You can place them under here:

    - Shape
    - Rectangle

    Things I'd take a look at:

    - The protected member functions of the superclass....
  7. Replies
    8
    Views
    8,131

    #pragma comment(lib, "Winmm.lib") that should...

    #pragma comment(lib, "Winmm.lib")

    that should work
  8. Replies
    8
    Views
    1,340

    You use functions of the type 'void' if you don't...

    You use functions of the type 'void' if you don't need an output value. For example if you have a function that only prints some text to the screen, you would use type 'void', because you don't need...
  9. Replies
    4
    Views
    1,429

    That's correct, because (0 + 0 + 0)/3 = 0. My...

    That's correct, because (0 + 0 + 0)/3 = 0.
    My bad.
  10. Replies
    4
    Views
    1,429

    You have to assign french, german and spanish a...

    You have to assign french, german and spanish a number first, because else it will go wrong.

    do it like this:

    int french = 0, german = 0, spanish = 0;

    This way the 0's will be overwritten by...
  11. Replies
    6
    Views
    3,027

    OK, thanks!

    OK, thanks!
  12. Replies
    6
    Views
    3,027

    Programmers salary

    I would like to know what a programmers average salary is? Not precise, but is it a good paid job ? Thanks
  13. Replies
    4
    Views
    1,225

    Yes, you now assign tal the number 0. You don't...

    Yes, you now assign tal the number 0. You don't check if the number is equal to zero. So it will break out of the if statement.

    Change if(tal = 0) to if(tal == 0)
  14. Replies
    7
    Views
    1,452

    You know, a long double's range is: 3.4^-4932 to...

    You know, a long double's range is: 3.4^-4932 to 3.4^4932. So I don't think it will be a problem. I'd use long though.
  15. Replies
    4
    Views
    1,111

    What compiler are you using ? When I compile it...

    What compiler are you using ? When I compile it in Visual C++ 2005 Express, it works just fine.
  16. But it's only the - Operator, and I tested it in...

    But it's only the - Operator, and I tested it in Dev-Cpp and there it compiles with no errors.
  17. Operator Overloading (Bug, or error in code?)

    Hey,

    I have this class:



    class Integer
    {
    private:
    int integer;
  18. Replies
    3
    Views
    1,027

    OK thanks! I'm using Microsoft Visual C++...

    OK thanks!

    I'm using Microsoft Visual C++ Enterprise edition, yes
  19. Replies
    3
    Views
    1,027

    Simple question - getline()

    Hey, I have a simple question.

    My test main:


    int main()
    {
    Player player;

    string name;
  20. Replies
    10
    Views
    1,192

    If you want to pass the structure to a function,...

    If you want to pass the structure to a function, pass it by reference, this saves memory and you don't have to return the structure.



    struct database {
    int id;
    int age;
    float...
Results 1 to 20 of 20