Search:

Type: Posts; User: FloridaJo

Page 1 of 7 1 2 3 4

Search: Search took 0.01 seconds.

  1. eh, hem, actually while that works, now that I...

    eh, hem, actually while that works, now that I read the problem again, it says "uses an array of char and a loop to read one word at a time"

    The next problem asks you to use Strings.
  2. In the spirit of learning, I think using tools...

    In the spirit of learning, I think using tools not yet covered is meant to teach tools that might not otherwise be covered. Hence, not being able to use if/else && etc. As in this example, it...
  3. Yes, yours is much neater, that --numword didn't...

    Yes, yours is much neater, that --numword didn't feel clean.
    And yes, Jim that makes sense. (but setw() wasn't covered yet, but thanks anyway for that)..

    thanks again guys.
    On to the next speed...
  4. Ah, ha! thank you Matticus. The old noobie...

    Ah, ha! thank you Matticus. The old noobie trip-up of whitespace on the buffer.
    Your lesson cleared things up, thanks so much.

    Here is the resulting code that works like it should:



    ...
  5. Not really, because my understanding of cin is...

    Not really, because my understanding of cin is that reads the input from the keyboard (standard) after the enter/return key is pressed.
    Then it has to loop and get another line and loop through it...
  6. This may give one an idea. Steve is fairly...

    This may give one an idea. Steve is fairly verbose which I like. He explains thing via many different angles.

    15218
    15219
    15220
  7. Obviously you didn't read the post completely....

    Obviously you didn't read the post completely.
    Let me repeat for you.
    Using only do-while, while, and or for statements and not using && II or any if-else statements. ONLY using what has been...
  8. sorry, but it looked like you were nit picking....

    sorry, but it looked like you were nit picking.
    So to understand what you are saying is this can't be done in C++, only C?
    I don't think so.
  9. This doesn't take into account multiple lines...

    This doesn't take into account multiple lines entered.
    It is read a line, read the words in that line, then read another line IF 'done' is not found.
  10. I'm going to deem this question not possible to...

    I'm going to deem this question not possible to answer with the tools supplied and put it in my errata sheet, and move on. None of these replies deal with the logic of answering the question.
  11. This is C except for the cout.

    This is C except for the cout.
  12. Is this programming exercise possible (don't answer with code, just is it possible?)

    Okay, I asked this over in C++ forum, but I think it's just too much C for them there.
    Maybe you guys can answer better.
    In C++ Primer Plus, Chapter 5 question 8 it asks to:



    I can get it,...
  13. So the the only way to make this work is to...

    So the the only way to make this work is to include an && as below (which violates the unwritten rule [using only what you've learned up till now]) .
    But another problem is it only stops when 'done'...
  14. The input is the keyboard, and we get a line,...

    The input is the keyboard, and we get a line, then we have to store that line somewhere.
    I could say:
    while (x <= strlen(temp_input_line)
    How would one extract words from a stored line?

    So...
  15. The author wants c-style strings here. So, no...

    The author wants c-style strings here. So, no string types at this time.
  16. Okay, what I have works as far as extracting the...

    Okay, what I have works as far as extracting the words, (in a separate test case) but the main question of how to make the logic work to only count the words before 'done' still avoids me.
  17. All logical operators so far have been only ==...

    All logical operators so far have been only == and != I should say.
    Still working on the flow so the code below isn't polished yet.
    Here is the code I have so far:




    #include <iostream>...
  18. Okay, so I'm still having a struggle with...

    Okay, so I'm still having a struggle with answering this programming question correctly.
    Using just do-while, while, or for loops with no use of logical operators or if/else statements, and no...
  19. It comes before std::string. I'm coming from C,...

    It comes before std::string.
    I'm coming from C, so I don't mind it.
  20. C++ Primer Plus by Steve Prata is in the list of...

    C++ Primer Plus by Steve Prata is in the list of recommended books.
    I think it is an excellent book. His reasoning for including C-style string handling is in working with other's C++ code, you may...
  21. Yes, he wants to us to use cstring, so yes....

    Yes, he wants to us to use cstring, so yes.
    Thanks. I'll keep slogging away.
  22. Is this programming exercise possible (don't answer with code, just is it possible?)

    Okay, so I'm not sure if I ran into an errata type question where the exercise answer is not possible yet, given what has been learned up to now.

    In C++ Primer Plus chapter 5, exercise 8 asks:

    ...
  23. Thanks, the address pointing to an address clears...

    Thanks, the address pointing to an address clears it up for me.
    As for the other points, Steve Prata of C++ Primer uses the endl; and
    that is the manual I am learning from at the moment.
    Also, the...
  24. Thanks. I guess my confusion is if (matrix + 1)...

    Thanks.
    I guess my confusion is if (matrix + 1) is an address,
    why is *(matrix + 1) not extracting or 'dereferencing' that value?
  25. Expected value, got address for *(matrix + 1)

    Hi,


    I was reading the C++ reference and ran across *(*(matrix + i) +j)
    as a way to return data from a two index array (ie. matrix [i][j])
    I'm trying to break it down to understand this...
Results 1 to 25 of 163
Page 1 of 7 1 2 3 4