Mixture.cpp: In constructor 'Frac::Frac(ll, ll)':
Mixture.cpp:12:36: error: call of overloaded 'abs(ll&)' is ambiguous
ll g = abs(__gcd(abs(_a), abs(_b)));
^
In file included from /usr/include/c++/7/bits/std_abs.h:38:0,
from /usr/include/c++/7/cmath:47,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41,
from Mixture.cpp:1:
/usr/include/stdlib.h:774:12: note: candidate: int abs(int)
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^~~
In file included from /usr/include/c++/7/cmath:47:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41,
from Mixture.cpp:1:
/usr/include/c++/7/bits/std_abs.h:56:3: note: candidate: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^~~
/usr/include/c++/7/bits/std_abs.h:61:3: note: candidate: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^~~
/usr/include/c++/7/bits/std_abs.h:70:3: note: candidate: constexpr double std::abs(double)
abs(double __x)
^~~
/usr/include/c++/7/bits/std_abs.h:74:3: note: candidate: constexpr float std::abs(float)
abs(float __x)
^~~
/usr/include/c++/7/bits/std_abs.h:78:3: note: candidate: constexpr long double std::abs(long double)
abs(long double __x)
^~~
Mixture.cpp:12:45: error: call of overloaded 'abs(ll&)' is ambiguous
ll g = abs(__gcd(abs(_a), abs(_b)));
^
In file included from /usr/include/c++/7/bits/std_abs.h:38:0,
from /usr/include/c++/7/cmath:47,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41,
from Mixture.cpp:1:
/usr/include/stdlib.h:774:12: note: candidate: int abs(int)
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^~~
In file included from /usr/include/c++/7/cmath:47:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41,
from Mixture.cpp:1:
/usr/include/c++/7/bits/std_abs.h:56:3: note: candidate: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^~~
/usr/include/c++/7/bits/std_abs.h:61:3: note: candidate: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^~~
/usr/include/c++/7/bits/std_abs.h:70:3: note: candidate: constexpr double std::abs(double)
abs(double __x)
^~~
/usr/include/c++/7/bits/std_abs.h:74:3: note: candidate: constexpr float std::abs(float)
abs(float __x)
^~~
/usr/include/c++/7/bits/std_abs.h:78:3: note: candidate: constexpr long double std::abs(long double)
abs(long double __x)
^~~
Mixture.cpp: In member function 'Frac Frac::operator*(const Frac&) const':
Mixture.cpp:47:16: warning: '*' in boolean context, suggest '&&' instead [-Wint-in-bool-context]
if(!!(a*r.a) || !!(b*r.b))
~~^~~~~
Mixture.cpp:47:29: warning: '*' in boolean context, suggest '&&' instead [-Wint-in-bool-context]
if(!!(a*r.a) || !!(b*r.b))
~~^~~~~
Mixture.cpp: In member function 'void Frac::change()':
Mixture.cpp:63:31: error: call of overloaded 'abs(ll&)' is ambiguous
if(!a && b) b /= abs(b);
^
In file included from /usr/include/c++/7/bits/std_abs.h:38:0,
from /usr/include/c++/7/cmath:47,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41,
from Mixture.cpp:1:
/usr/include/stdlib.h:774:12: note: candidate: int abs(int)
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^~~
In file included from /usr/include/c++/7/cmath:47:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41,
from Mixture.cpp:1:
/usr/include/c++/7/bits/std_abs.h:56:3: note: candidate: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^~~
/usr/include/c++/7/bits/std_abs.h:61:3: note: candidate: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^~~
/usr/include/c++/7/bits/std_abs.h:70:3: note: candidate: constexpr double std::abs(double)
abs(double __x)
^~~
/usr/include/c++/7/bits/std_abs.h:74:3: note: candidate: constexpr float std::abs(float)
abs(float __x)
^~~
/usr/include/c++/7/bits/std_abs.h:78:3: note: candidate: constexpr long double std::abs(long double)
abs(long double __x)
^~~
Mixture.cpp:64:31: error: call of overloaded 'abs(ll&)' is ambiguous
if(!b && a) a /= abs(a);
^
In file included from /usr/include/c++/7/bits/std_abs.h:38:0,
from /usr/include/c++/7/cmath:47,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41,
from Mixture.cpp:1:
/usr/include/stdlib.h:774:12: note: candidate: int abs(int)
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^~~
In file included from /usr/include/c++/7/cmath:47:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41,
from Mixture.cpp:1:
/usr/include/c++/7/bits/std_abs.h:56:3: note: candidate: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^~~
/usr/include/c++/7/bits/std_abs.h:61:3: note: candidate: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^~~
/usr/include/c++/7/bits/std_abs.h:70:3: note: candidate: constexpr double std::abs(double)
abs(double __x)
^~~
/usr/include/c++/7/bits/std_abs.h:74:3: note: candidate: constexpr float std::abs(float)
abs(float __x)
^~~
/usr/include/c++/7/bits/std_abs.h:78:3: note: candidate: constexpr long double std::abs(long double)
abs(long double __x)
^~~
Mixture.cpp: In function 'int main()':
Mixture.cpp:112:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
~~~~~^~~~~~~~~~
Mixture.cpp:116:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf(" %c", &com);
~~~~~^~~~~~~~~~~~~
Mixture.cpp:156:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &d);
~~~~~^~~~~~~~~~