==,>>,*=,<=,>,== and some other operators#36
Conversation
My implementation which i did during my work.
|
Issues
======
- Added 13
Clones added
============
- Big_Integer/main.cpp 2
See the complete overview on Codacy |
| return false; | ||
| } | ||
|
|
||
| bool operator <= (Integer passed) { // less or equal operator |
There was a problem hiding this comment.
Codacy found an issue: Function parameter 'passed' should be passed by const reference.
| value = passed;//if positive store as it's | ||
| } | ||
| } | ||
| Integer(string passed, int Sign) { |
There was a problem hiding this comment.
Codacy found an issue: Function parameter 'passed' should be passed by const reference.
| wheel ++; | ||
| current = subtract(current, b); | ||
| } | ||
| result += (char)(wheel + '0'); |
There was a problem hiding this comment.
Codacy found an issue: Variable 'result' is assigned a value that is never used.
| for (char ch: a) { | ||
| current = (current << 1) + (current << 3) + ch - '0'; | ||
| if (current >= b) { | ||
| result += (char)(current / b + '0'); |
There was a problem hiding this comment.
Codacy found an issue: Variable 'result' is assigned a value that is never used.
|
|
||
|
|
||
| string _modulo(string a, string b) { // modulo operation of two integers(strings) | ||
| string result = ""; |
There was a problem hiding this comment.
Codacy found an issue: Variable 'result' is assigned a value that is never used.
|
|
||
|
|
||
|
|
||
| string _modulo(string a, string b) { // modulo operation of two integers(strings) |
There was a problem hiding this comment.
Codacy found an issue: Function parameter 'b' should be passed by const reference.
| } | ||
| } | ||
|
|
||
| void operator *= (Integer multiplier) { |
There was a problem hiding this comment.
Codacy found an issue: Function parameter 'multiplier' should be passed by const reference.
| //Default Empty Constructor::Dont use delegation... | ||
| } | ||
| //positive - negative value separator | ||
| Integer(string passed) { |
There was a problem hiding this comment.
Codacy found an issue: Class 'Integer' has a constructor with 1 argument that is not explicit.
| } | ||
| } | ||
| Integer(string passed, int Sign) { | ||
| value = passed; |
There was a problem hiding this comment.
| return *this == passed || *this < passed; | ||
| } | ||
|
|
||
| bool operator > (Integer passed) { // greater operator |
There was a problem hiding this comment.
Codacy found an issue: Function parameter 'passed' should be passed by const reference.
| } | ||
| } | ||
|
|
||
| void operator %= (Integer dividend) { // modulo operator |
There was a problem hiding this comment.
Codacy found an issue: Function parameter 'dividend' should be passed by const reference.
| return to_string(current); | ||
| } | ||
|
|
||
| string modulo(string a, string b) { // Day 5: modulo of two integers |
There was a problem hiding this comment.
Codacy found an issue: Function parameter 'a' should be passed by const reference.
| } | ||
|
|
||
| //Day 4: if integer range numbers are passed then only will work fine.....preferably pass string values.. | ||
| Integer(int passed) { //Remember Remove this as we will be passing string as a parameter |
There was a problem hiding this comment.
Codacy found an issue: Class 'Integer' has a constructor with 1 argument that is not explicit.
My implementation which i did during my work. Hope this will help.