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

Search:

Type: Posts; User: wolle

Search: Search took 0.01 seconds.

  1. Replies
    12
    Views
    1,424

    Re: Structured binding as initialisation

    From what I can see there are two options, either use a Tuple as you did in #1, or use a struct (or class) as I suggested in #6.

    BUT if the sole purpose is to get variables inside the scope of a...
  2. Replies
    12
    Views
    1,424

    Re: Structured binding as initialisation

    I thought about including my suggestion of an outer scope but since it had no meaning I left it out. Anyway it's easy to put one in anywhere you want it and it would look like this,



    string...
  3. Replies
    12
    Views
    1,424

    Re: Structured binding as initialisation

    Well, for readability reasons I don't think for-loops should be too crammed. And as we all know, syntax cramming (aka one-liners) don't make code more efficient.

    But okay, you could collect the...
  4. Replies
    12
    Views
    1,424

    Re: Structured binding as initialisation

    I wouldn't say it's better but as an alternative you could introduce an outer scope to the for-loop, like



    string newfile()
    {
    const string filstem = "test"s;
    const size_t fnumstart = 0U;
    ...
Results 1 to 4 of 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)