Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Assertion Divide by Zero Example
#include <assert.h> #include <iostream> using namespace std; int division(int a, int b) { if (b==0) { cerr << "Error at line " << __LINE__ << " in file " << __FILE__ << endl; } assert(b!=0); return (a/b); } int main () { int x = 11; int y = 0; int z; z = division(x, y); cout << "Answer is " << z << endl; return 0; }
run
|
edit
|
history
|
help
0
regex
Random values and probability distribution
bubble sort
Linker error while passing constexpr variable as const &
auto Keyword Example
Graphs Iteration 2.1 Directed Graphs
Copy uint64 data into uint32 with padding
Tilted uniform distribution random number generator over min/max range
Pure virtual function called!
even number