hi, I'm begginer in c++
why abs function gives me CE? it works in my compiler;
abs function
Moderator: Board moderators
-
- Experienced poster
- Posts: 209
- Joined: Sun Jan 16, 2005 6:22 pm
UVa changed their compiler(may be).
So use:-
Its save.
So use:-
Code: Select all
#include <cstdlib>
....
int abs(){}
...
Last edited by asif_rahman0 on Wed Aug 23, 2006 11:04 pm, edited 1 time in total.
-
- A great helper
- Posts: 481
- Joined: Sun Jun 19, 2005 1:18 am
- Location: European Union (Slovak Republic)
Re: abs function
The following code doesn't get CE on OJ:Giorgi wrote:hi, I'm begginer in c++
why abs function gives me CE? it works in my compiler;
code.cc wrote:#include<cstdio>
#include<cstdlib>
#include<cmath>
using namespace std;
int main(void)
{
........double a=-7.0;
........int b=-6;
........printf("%lf %d\n", abs(a), abs(b));
........return 0;
}