Search:

Type: Posts; User: algruber

Search: Search took 0.01 seconds.

  1. Replies
    8
    Views
    4,155

    What I can't understand is why nobody seems to ...

    What I can't understand is why nobody seems to think there is anything bizarre about a language that has to use the same word to mean so many different things. Static is a fine name for any one of...
  2. int main() { int number1; int number2;...

    int main()

    {
    int number1;
    int number2;
    int stonum;
    int count=0;
    int num1;
    int num2;
  3. Replies
    2
    Views
    2,823

    no, the number you put in the declaration is the...

    no, the number you put in the declaration is the number of elements, not the index of the highest element.
    In other words, int ar[4]; gives 4 elements from ar[0]to ar[3].
    Ciao Al:o
  4. Replies
    6
    Views
    1,011

    summing it up

    Looks to me like this is what the answers add up to:

    int duration;
    int gimmeHalf(int var) {return var/2};
    cout <<gimmeHalf(duration);

    ciao, Al;)
  5. Replies
    13
    Views
    2,053

    Since this thread has been reawakened, I want to...

    Since this thread has been reawakened, I want to thank everybody who helped me, and tell some of what I have learned:
    1. One of the first responses was that my dream reference book does not exist. I...
  6. Replies
    5
    Views
    1,326

    Hi, :o Let's suppose user enters: John Jim Bob...

    Hi, :o
    Let's suppose user enters: John Jim Bob and hits enter
    here's how I read your getname() function

    char getname() {
    char arraynames[3][6]; //declare array
    cout<<"enter 3...
  7. I think your problem is connected with the fact...

    I think your problem is connected with the fact that you can't do '=' with 0-terminated strings outside of declarations.

    There are at least 4 different common string "systems" in C++ which I...
  8. Replies
    2
    Views
    1,464

    I don't know your definition of reference; mine...

    I don't know your definition of reference; mine is an alphabetical listing in which I can look up whatever is puzzling me today. And I like the answers to be complete, not shallow. Of course, I've...
  9. Replies
    4
    Views
    831

    recursive function help

    This is a sorting problem. Here's the answer, in English.
    1. Create an array,

    2. success is when each slot contains its number, i.e. 1 has 1, 2 has 2, etc, except that 5 contains 0 which is what...
  10. Replies
    3
    Views
    876

    If you know how to turn a number into a string,...

    If you know how to turn a number into a string, try to figure out how to print a string backwards. Even if you don't, it's easier to think it through for a string.

    Clue: if you print the letter...
  11. Replies
    4
    Views
    831

    Which is A and which B? BTW, it's spelled...

    Which is A and which B?
    BTW, it's spelled recursive.
    Al:)
  12. Replies
    3
    Views
    2,039

    Re: Illegal local function definition

    It would be easier to spot the problem if you included main(), but meanwhile, what's:

    if ( !validword( temp ) ) //??????????????
    bool validword(int word)
    {
    return (...
  13. Replies
    5
    Views
    1,081

    Hi Learnin, I hear that you can enclose pretty...

    Hi Learnin,
    I hear that you can enclose pretty much any code in {}, but I am wondering why you put them there. I have never seen anything like this. If they are for documentation, a couple of...
  14. Replies
    7
    Views
    1,007

    Go back and take another look at the array reply...

    Go back and take another look at the array reply and its use of new. New returns a pointer, so that's a good reason for needing to know how to deal with them.

    So why do you need New. Because C/C++...
  15. Replies
    3
    Views
    1,565

    You don't seem to be looking for the recursive...

    You don't seem to be looking for the recursive version, but if you're by any chance noy familiar with it, this may help you understand the iterative one:

    double fib(int n) {
    if (n<2)...
  16. Replies
    6
    Views
    2,343

    Zen, Thanks. You let me learn and vent at the...

    Zen, Thanks. You let me learn and vent at the same time. What could be better.
    ciao
  17. Replies
    6
    Views
    2,343

    pointers/references one more time

    Zen, as another newbie wrestling with the same question, can you confirm what I think you said:

    Here are 2 functions
    1. void fn(int& n, char& c) {n=3*n;}
    2. void fn(int *n, char *c)...
  18. Replies
    0
    Views
    1,754

    C++ Goldmine & Buried Treasure

    http://www.rt.com/man/ gives definitions & parameters of lotsa functions.
    Arranged alphabetically. No time wasted.
    Great site for people (like me) who forget functions and parameters.
    Concise...
  19. Replies
    13
    Views
    2,053

    ...the search continues

    Hi, I appreciate everyone trying to help, and I'm still looking. I'm leaning towards "reference" titles. Any comments on the following:
    Schildt: C++ The Complete Reference or C/C++ Programmer's...
  20. Replies
    13
    Views
    2,053

    Looking for an unusual c++ book

    I know I'm picky, but I can't find my idea of a good c++ book. If you know anything that comes close, please tell me. Here's what I want:

    1. My biggest wish is for alphabetical lookup.
    I want...
Results 1 to 20 of 20