本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
開始模擬
用CreateApplication()
於建立應用程式。
範例
Result<Application> applicationResult = Api::CreateApplication(); if (!applicationResult) { ErrorCode errorCode = WEAVERRUNTIME_EXPECT_ERROR(applicationResult); std::cout << "Failed to create application. Error code " << static_cast<std::underlying_type_t<ErrorCode>>(errorCode) << " Last error message "<< Api::LastErrorMessage() << "."; return 1; } /** * Run simulation */ RunSimulation(std::move(applicationResult.assume_value()));