using namespace System; using namespace System::IO; using namespace System::Text; int main() { try { FileStream^ fs = gcnew FileStream( "D:\\Variables.txt", FileMode::CreateNew, FileAccess::ReadWrite ); //array<Byte>^info = (gcnew UTF8Encoding( true ))->GetBytes("Hello"); array<Byte>^info = { 0x48, 0x65, 0x6c, 0x6c, 0x6f }; fs->Write( info, 0, info->Length ); } catch ( Exception^ e ) { Console::WriteLine( "例外が発生した。" ); Console::WriteLine( e ); } Console::ReadLine(); }
0 件のコメント:
コメントを投稿