斷言操作
對一個表示式進行判斷,如果返回為假,就會報錯。
#include<assert.h>
void assert(int expression);
#include<iostream>
#include<windows.h>
#include<assert.h>
using namespace std;
void devide(int a,int b)
{
assert(b!=0);
cout<<a/b<<endl;
}
int main()
{
devide(1,0);
}
相關文章
- 十二、Jmeter 斷言-響應斷言、Json 斷言和 Beanshell 斷言JMeterJSONBean
- 肯定賦值斷言與非空斷言賦值
- unittest斷言-assertIn
- Go 語言編譯期斷言Go編譯
- C語言斷言assert詳解C語言
- Nodejs 斷言 assertNodeJS
- TypeScript 型別斷言TypeScript型別
- 淺析Java斷言Java
- postman(三):新增斷言Postman
- 優雅且語義化的斷言之—將模型屬性斷言變為模型方法斷言模型
- python斷言方法assertPython
- apipost如何設定斷言API
- Java中的斷言assertJava
- postmen新增常用斷言解析
- python斷言的使用Python
- js正則斷言整理JS
- Python中斷言assertPython
- Locust 斷言的實現?
- Go 語言操作 MySQL 之 CURD 操作GoMySql
- C語言位操作C語言
- SpringBoot(20)---斷言(Assert)Spring Boot
- 在 Python 中使用斷言Python
- 組合語言---判斷字元組合語言字元
- assertj斷言機制記錄
- C語言中如何寫斷言C語言
- C語言:判斷閏年C語言
- jmeter學習指南之響應斷言和beanshell斷言JMeterBean
- Go 語言操作 MySQL 之 事務操作GoMySql
- Fiddler大全之斷點操作斷點
- 批操作效能影響診斷
- C語言異常與斷言介面的實現C語言
- C語言-指標操作C語言指標
- C語言檔案操作C語言
- C語言(檔案操作)C語言
- Nodejs教程11:assert(斷言)模組NodeJS
- go 的方法集和介面斷言Go
- 匯出類介面如何斷言
- 組合語言--單步中斷組合語言