Search:

Type: Posts; User: pantera

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    3,457

    Hi, I don't know how to stop the message "The...

    Hi, I don't know how to stop the message "The longest palidrome is" from appearing if the user doesn't enter anything (just entering EOF). Where should I put that phrase? I'm not sure enough about...
  2. Replies
    2
    Views
    3,457

    Exercise 5.10 (ACCELERATED C++)

    ....
  3. Replies
    19
    Views
    9,383

    Thank you all for the suggestions. They're all...

    Thank you all for the suggestions. They're all very useful to me. When you began learning the very first language years back, did you fall into some sort of situation where you were really wandering...
  4. Replies
    19
    Views
    9,383

    Is C/C++ suitable for an econ student?

    Hi,

    I'm not becoming a professional programmer, because I'm pursuing an econ degree. I'm now learning C++ by myself and getting a lot of help on this forum.

    Is learning C++ useful for me in...
  5. Exercise 4.1 ("Accelerated C++"): Please help to improve the program

    Hi,

    I just have done this exercise from "Accelerated C++". Several things I'm not sure about:

    (1) Deal with "times" or "time", i.e. if <= 1, then choose "time", and else choose "times". I tried...
  6. Replies
    9
    Views
    3,315

    Hi, I'm using Visual C++ Express 2008 at school,...

    Hi, I'm using Visual C++ Express 2008 at school, and Terminal at home (Mac OS). Thanks a lot
  7. Replies
    9
    Views
    3,315

    Hi hk_mp5pdw, how can I run the code through the...

    Hi hk_mp5pdw, how can I run the code through the debugger? I don't get that. Can you show me how? The errors only come when I run the program, and it just give general errors, not where it is...
  8. Replies
    9
    Views
    3,315

    Thank you very much. The code now runs without...

    Thank you very much. The code now runs without errors after I removed "=", as you suggested...
  9. Replies
    9
    Views
    3,315

    Vector subscript out of error. Please help!

    Hi,

    I'm writing this program to calculate quartiles. The error message is that the vector subscript is out of range; however, I have not been able to pinpoint where it is. Could you please help?...
  10. Thank you. I've revised the program based on your...

    Thank you. I've revised the program based on your hint.

    - For min/max, I just used first element for min & last element for max, since it's been sorted, i.e. results.min = results.v[0];...
  11. Thank you so much for helping me... Below is the...

    Thank you so much for helping me... Below is the revised program I wrote based on your suggestion...


    // Exercise 8.12

    #include "std_lib_facilities.h"
    #include <numeric>

    /*
    Write a...
  12. Thank you for helping me out... // Exercise...

    Thank you for helping me out...


    // Exercise 8.12

    #include "std_lib_facilities.h"

    /*
    Write a function that finds the smallest & the largest element of a vector
    argument and also compute...
  13. Thank you...

    Thank you...
  14. something wrong with the idea of creating a struct - how to fix it?

    Hi,

    Below is the first exercise on struct that I did. I have a feeling that I didn't get an idea behind the struct. Looking at the program I wrote, I am wondering what is the benefit of writing...
  15. Replies
    5
    Views
    1,843

    It's a header file used in the new book by Bjarne...

    It's a header file used in the new book by Bjarne Stroustrup. I'm learning C++ from this book, so I copy it & use it in every program.
  16. Replies
    5
    Views
    1,843

    Thanks a lot, ctrl_freak. I should have put else ...

    Thanks a lot, ctrl_freak. I should have put else just before median... Thanks for helping
  17. Replies
    5
    Views
    1,843

    It doesn't return a correct result...

    Hi,

    I'm doing the first exercise on struct. I can't figure out why it doesn't return a correct result for median. It always rounds it up... Say if I input 1 2 3 4, it returns the median == 3, not...
  18. Hi JacobN, thanks so much for helping. It runs...

    Hi JacobN, thanks so much for helping. It runs properly now...
  19. Hi, The warning I received is as follows: ...

    Hi,

    The warning I received is as follows:


    terminate called after throwing an instance of 'Range_error'
    what(): Range error: -1
    {Abort trap
  20. Why range error & how to fix it in this program?

    Hi,

    I can't figure out why it gives the warning "range error". The program doesn't run... Could you please give a hint for fixing it? Thanks a lot...


    // Exercise 8.5
    #include...
  21. Thanks so much for your help! With the solution...

    Thanks so much for your help! With the solution given, things look so much, much clearer. Before it, it took me days to work on this error, and I couldn't locate the logic error. Thanks a lot, buddy.
  22. Replies
    4
    Views
    1,177

    Thank you for the hint. Does this mean I need to...

    Thank you for the hint. Does this mean I need to add these two statements as in the following? It still doesn't work somehow :-<


    // Exercise 8 - Chapter 5 ("Programming: Principles and Practice...
  23. Fining the mode in a vector of numbers: Logic errors

    Hi,

    Could you please help point out the logic error in the following codes, & give a hint for fixing the error? This is an exercise for control loop and vectors, so I'm not allowed to use a...
  24. Find the largest Fibonacci that fits in an int: It's running extremely slowly...

    It's running unbelievably slowly. Can you help suggest the way to improve the code in a simple way (simple code, 'coz I'm still at a very beginning level)? Thanks a lot.


    // Exercise 11 - Chapter...
  25. Replies
    4
    Views
    1,177

    Why it can't read in a number?

    Hi, I can't figure out why it can't read in the number N... Can you please help?


    // Exercise 8 - Chapter 5 ("Programming: Principles and Practice using C++")
    #include "std_lib_facilities.h"
    ...
Results 1 to 25 of 34
Page 1 of 2 1 2