| Problema | Numere Mari | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64231180 | Utilizator | |
| Fișier | numere_mari.cpp | Dimensiune | 5.71 KB |
| Data încărcării | 24 Aprilie 2026, 10:05 | Scor/rezultat | Eroare de compilare |
numere_mari.cpp:243:2: error: expected ‘}’ at end of input 243 | } | ^ numere_mari.cpp:10:1: note: to match this ‘{’ 10 | { | ^ numere_mari.cpp: In constructor ‘big_int::big_int()’: numere_mari.cpp:18:19: warning: converting to non-pointer type ‘__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type’ {aka ‘char’} from NULL [-Wconversion-null] 18 | digits[0]=NULL; | ^~~~ numere_mari.cpp: In constructor ‘big_int::big_int(std::string)’: numere_mari.cpp:25:21: warning: NULL used in arithmetic [-Wpointer-arith] 25 | while(s[i]!=NULL){ | ^~~~ numere_mari.cpp:32:19: warning: converting to non-pointer type ‘__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type’ {aka ‘char’} from NULL [-Wconversion-null] 32 | digits[i]=NULL; | ^~~~ numere_mari.cpp: In member function ‘big_int::operator std::string() const’: numere_mari.cpp:55:32: warning: converting to non-pointer type ‘__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type’ {aka ‘char’} from NULL [-Wconversion-null] 55 | r[digits.size()+1]=NULL; | ^~~~ numere_mari.cpp:62:30: warning: converting to non-pointer type ‘__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type’ {aka ‘char’} from NULL [-Wconversion-null] 62 | r[digits.size()]=NULL; | ^~~~ numere_mari.cpp: In member function ‘big_int big_int::operator+(const big_int&) const’: numere_mari.cpp:120:25: warning: converting to non-pointer type ‘__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type’ {aka ‘char’} from NULL [-Wconversion-null] 120 | r.digits[0]=NULL; | ^~~~ numere_mari.cpp:123:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const long unsigned int’ [-Wsign-compare] 123 | for(i=0;i<min(digits.size(),b.digits.size());i++) | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ numere_mari.cpp:129:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 129 | for (; i < digits.size(); i++) | ~~^~~~~~~~~~~~~~~ numere_mari.cpp:135:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 135 | for (; i < b.digits.size(); i++) | ~~^~~~~~~~~~~~~~~~~ numere_mari.cpp: In member function ‘big_int big_int::operator-(const big_int&) const’: numere_mari.cpp:156:22: error: ‘thsi’ was not declared in this scope; did you mean ‘this’? 156 | return -(thsi->abs+b); | ^~~~ | this numere_mari.cpp:163:25: warning: converting to non-pointer type ‘__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type’ {aka ‘char’} from NULL [-Wconversion-null] 163 | r.digits[0]=NULL; | ^~~~ numere_mari.cpp:166:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const long unsigned int’ [-Wsign-compare] 166 | for(i=0;i<min(digits.size(),b.digits.size());i++) | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ numere_mari.cpp:172:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 172 | for (; i < digits.size(); i++) | ~~^~~~~~~~~~~~~~~ numere_mari.cpp:178:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 178 | for (; i < b.digits.size(); i++) | ~~^~~~~~~~~~~~~~~~~ numere_mari.cpp:185:5: error: a function-definition is not allowed here before ‘{’ token 185 | { | ^ numere_mari.cpp:189:5: error: a function-definition is not allowed here before ‘{’ token 189 | { | ^ numere_mari.cpp:193:5: error: a function-definition is not allowed here before ‘{’ token 193 | { | ^ numere_mari.cpp:196:5: error: ‘friend’ used outside of class 196 | friend istream& operator >> (istream& in, big_int& n) | ^~~~~~ | ------ numere_mari.cpp:197:5: error: a function-definition is not allowed here before ‘{’ token 197 | { | ^ numere_mari.cpp:200:5: error: ‘friend’ used outside of class 200 | friend ostream& operator << (ostream& out, const big_int& n) | ^~~~~~ | ------ numere_mari.cpp:201:5: error: a function-definition is not allowed here before ‘{’ token 201 | { | ^ numere_mari.cpp:206:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 206 | int main() | ^~ numere_mari.cpp:206:9: note: remove parentheses to default-initialize a variable 206 | int main() | ^~ | -- numere_mari.cpp:206:9: note: or replace parentheses with braces to value-initialize a variable numere_mari.cpp:207:1: error: a function-definition is not allowed here before ‘{’ token 207 | { | ^ numere_mari.cpp:226:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 226 | int main() | ^~ numere_mari.cpp:226:9: note: remove parentheses to default-initialize a variable 226 | int main() | ^~ | -- numere_mari.cpp:226:9: note: or replace parentheses with braces to value-initialize a variable numere_mari.cpp:227:1: error: a function-definition is not allowed here before ‘{’ token 227 | { | ^ numere_mari.cpp:243:2: error: expected ‘}’ at end of input 243 | } | ^ numere_mari.cpp:151:5: note: to match this ‘{’ 151 | { | ^ numere_mari.cpp: At global scope: numere_mari.cpp:243:2: error: expected unqualified-id at end of input 243 | } | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Numere Mari face parte din a doua categorie. Pentru aceste probleme se folosește un program suport, furnizat de propunătorul problemei. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.