Search:

Type: Posts; User: aaleclaire

Search: Search took 0.00 seconds.

  1. Replies
    3
    Views
    1,971

    parsing command line

    Hi there,

    I have done a fair amount of research in order to figure out how to parse a command line for, say, and integer. The code below almost works, except when the user types in, for example,...
  2. Replies
    4
    Views
    2,287

    Thank you both! Why does c++ use c style...

    Thank you both! Why does c++ use c style strings. For backward compatibility?
  3. Replies
    4
    Views
    2,287

    Using ofstream

    Hi! I am trying to use ofstream. All of the examples I have seen online construct the stream like this:
    insert

    ofstream file_writer("my_file_name.txt").


    What I would like to do is to...
  4. Replies
    9
    Views
    1,055

    Thanks again. I will give it a try. This is my...

    Thanks again. I will give it a try. This is my second day learning C++, so I appreciate the help! I am a hardware guy who needs a change!
  5. Replies
    9
    Views
    1,055

    Thank you laserlight! I am using getline() to...

    Thank you laserlight! I am using getline() to read in the command line as you suggest. The part that I have not seen before is istringstream, but I get the idea. Is there a generic way to read in...
  6. Replies
    9
    Views
    1,055

    Ah, okay. I will study the input error states...

    Ah, okay. I will study the input error states some more later. Now, the cin.ignore will ignore and throw away the fraction part of a number if the cin is directed to a type int? I will try it...
  7. Replies
    9
    Views
    1,055

    Thank you! What does the if (!cin) check for?...

    Thank you! What does the if (!cin) check for?
    Aaron
  8. Replies
    9
    Views
    1,055

    Parsing Inputs

    Hi there! I am using the Jumping into C++ book as a guide to start writing C++. In the first examples, we are asked to read in some numbers and print them out. If I set the variable type to read...
Results 1 to 8 of 8