Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

dialects of C++

$
0
0

was reading this: http://andrewgarrison.com/blog/porting-an-ios-app-to-windows-8/

the code:

void ReadFile(Platform::String^ fileName)
{
   using namespace Windows::Storage;
   using namespace Concurrency;

   // First get the file...asynchronously
   auto folder = ApplicationData::Current->LocalFolder;
   task getFileTask(folder->GetFileAsync(fileName));

   // Then read the file...asynchronously
   auto readBufferTask = getFileTask.then([] (StorageFile^ f)  {
      return FileIO::ReadBufferAsync(f);
   });

   // Then convert the buffer into something usable, like 
   // a std::vector......asynchronously
   readBufferTask.then([requestId] (Streams::IBuffer^ b) {
      auto a = ref new Platform::Array(b->Length);
      Streams::DataReader::FromBuffer(b)->ReadBytes(a);

      _data.clear();
      for (uint i = 0; i < b->Length; i++)
      {
         _data.push_back((char)a[i]);
      }

      // Now set a flag to indicate that _data vector is ready
      _dataIsReady = true;
   });
}

what dialect is this, and why is the bitwise or operator being use in this way, that is not the way that operator is supposed to be used


Corsair Carbide 300R with window & Corsair TX850V2 70A@12V

Asus M5A99FX PRO R2.0 CFX/SLI & AMD Phenom II 965 C3 Black Edition @ 4.0 GHz & G.SKILL RipjawsX DDR3-2133 8 GB 

GTX 260 SLI 216 core (GT200 Tesla) & Asus PA238QR IPS LED HDMI DP 1080p

ST2000DM001 & Windows 8.1 Enterprise x64

Microsoft Wireless Desktop 2000 & Wacom Bamboo CHT470M

Place your rig specifics into your signature like I have, makes it 100x easier to understand!


Hardcore Games Legendary is the Only Way to Play


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>