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...
Type: Posts; User: pantera
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...
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...
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...
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...
Hi, I'm using Visual C++ Express 2008 at school, and Terminal at home (Mac OS). Thanks a lot
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...
Thank you very much. The code now runs without errors after I removed "=", as you suggested...
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?...
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];...
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...
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...
Thank you...
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...
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.
Thanks a lot, ctrl_freak. I should have put else just before median... Thanks for helping
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...
Hi JacobN, thanks so much for helping. It runs properly now...
Hi,
The warning I received is as follows:
terminate called after throwing an instance of 'Range_error'
what(): Range error: -1
{Abort trap
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...
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.
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...
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...
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...
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"
...