|
From: gpuime <gp...@pa...> - 2005-04-08 11:02:51
|
Hello all,
in this tiny program throw causes a crash, but I don't see why......
#include <iostream>
#inclde <cmath>
double ln(double x) throw(char*){
if(x<=0) throw "ln error" ; return log(x) ; }
int main(){
for(x=10;x>-11;x-=10){
try{ cout<<ln(x)<<endl ; }
catch(char *s){ cout<<s ; }
} }
|