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

Search:

Type: Posts; User: 2kaud

Search: Search took 0.03 seconds.

  1. Replies
    12
    Views
    1,537

    Re: Structured binding as initialisation

    As of VS 2017 15.7.1, filesystem is now in std namespace. Note that this is a new implementation version of filesystem and may not be always compatible with the previous experimental::filesystem,...
  2. Replies
    12
    Views
    1,537

    Re: Structured binding as initialisation

    From the code in post #1



    for (auto[fnum, ifs] = make_tuple(fnumstart, ifstream()); ifs.open(filnam = filstem + (fnum ? to_string(fnum) : "")), ifs.is_open(); ifs.close(), ++fnum);


    with...
  3. Replies
    12
    Views
    1,537

    Re: Structured binding as initialisation

    This thread is about multi-variable initialisation of different types within a loop. The code given in post #1 is just an example from post #9 of this thread...
  4. Replies
    12
    Views
    1,537

    Re: Structured binding as initialisation

    string newfile2()
    {
    const string filstem = "test";
    const size_t fnumstart = 0U;
    const size_t MAX_FNUM = 1000; // max number of files

    ifstream ifs;
    string filnam = filstem;
    for (size_t...
  5. Replies
    12
    Views
    1,537

    Re: Structured binding as initialisation

    What is probably really wanted is the ability to have a definition statement like



    char a, int b = 0, c = 0, string d, ifstream e;
  6. Replies
    12
    Views
    1,537

    Structured binding as initialisation

    In this example code



    string newfile()
    {
    const string filstem = "test"s;
    const size_t fnumstart = 0U;

    string filnam;
Results 1 to 6 of 6


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)