Does anyone know what I'm doing wrong with this.
// STORAGE FILE
StorageFile^ saveFile;
// FILE PICKER, FOR SELECTING A SAVE FILE
FileOpenPicker^ filePicker = ref new FileOpenPicker;
// ARRAY OF FILE TYPES
Array<String^>^ fileTypes = ref new Array<String^>(1);
fileTypes->Data[0] = ".txt";
filePicker->ViewMode = PickerViewMode::Thumbnail;
filePicker->SuggestedStartLocation = PickerLocationId::Desktop;
filePicker->FileTypeFilter->ReplaceAll(fileTypes);
// THIS SHOULD HOPEFULLY LET US PICK A FILE
saveFile = filePicker->PickSingleFileAsync();
specifically the last line:
saveFile = filePicker->PickSingleFileAsync();
I get the following error.
error C2440: '=': cannot convert from 'Windows::Foundation::IAsyncOperation ^' to 'Windows::Storage::StorageFile ^'