CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: 2kaud

Search: Search took 0.10 seconds.

  1. Replies
    9
    Views
    2,725

    Re: Print a '-' after every 3 numbers from ID

    Oops! Yeah... Still it is the season of goodwill to all. :wave:
  2. Replies
    9
    Views
    2,725

    Re: Print a '-' after every 3 numbers from ID

    Try this. This will output any integer (32 bit positive signed) formatted with the delim char every 3 digits starting from the least significant.



    #include <iostream>
    using namespace std;
    ...
  3. Replies
    9
    Views
    2,725

    Re: Print a '-' after every 3 numbers from ID

    What's the type of Id?
  4. Replies
    9
    Views
    2,725

    Re: Print a '-' after every 3 numbers from ID

    You will need to use a combination of extraction and getline to read the whole line. Something like



    #include <iostream>
    #include <string>
    using namespace std;

    int main()
    {
  5. Replies
    9
    Views
    2,725

    Re: Print a '-' after every 3 numbers from ID

    The extraction stream operator >> extracts the next element from the stream according to the type of the required extraction. The next element is an element of the required type delimited by white...
Results 1 to 5 of 5





Click Here to Expand Forum to Full Width

Featured