•Coty
|
 |
« Răspunde #25 : August 03, 2006, 18:16:01 » |
|
mi se pare mie sau au fost o groaza de erori la g++ ? jtemp.cpp: In function `void mare_sqrt(long int*, long int*)\': jtemp.cpp:66: error: call of overloaded `sqrt(long int&)\' is ambiguous /usr/include/bits/mathcalls.h:157: error: candidates are: double sqrt(double) /usr/include/c++/3.3/cmath:550: error: long double std::sqrt(long double) /usr/include/c++/3.3/cmath:546: error: float std::sqrt(float
si voi ce intelegeti din asta?
|
|
|
Memorat
|
|
|
|
•greco
|
 |
« Răspunde #26 : August 03, 2006, 18:18:22 » |
|
Incearca sa apelezi sqrt((double)x), daca variabila x nu e de tipul double. SQRT(3) Linux Programmer's Manual SQRT(3)
NAME sqrt, sqrtf, sqrtl - square root function
SYNOPSIS #include <math.h>
double sqrt(double x);
float sqrtf(float x);
long double sqrtl(long double x);
DESCRIPTION The sqrt() function returns the non-negative square root of x. It fails and sets errno to EDOM, if x is negative.
ERRORS EDOM x is negative.
CONFORMING TO SVID 3, POSIX, BSD 4.3, ISO 9899. The float and the long double variants are C99 requirements.
|
|
|
Memorat
|
Jump in the cockpit and start up the engines Remove all the wheelblocks there's no time to waste Gathering speed as we head down the runway Gotta get airborne before it's too late.
|
|
|
•Coty
|
 |
« Răspunde #27 : August 03, 2006, 18:29:25 » |
|
ah damn, uitasem ca e pe double... dar acasa gasea bine tipurile  sa fie de la faptul ca am g++.4.0 ? uof... oricum, mai multi au avut erori cel putin ciudate  pe cand le bagati si in arhiva?  si eventual si solutiile?
|
|
|
Memorat
|
|
|
|
•greco
|
 |
« Răspunde #28 : August 03, 2006, 18:33:41 » |
|
Nu stiu sigur daca asta e motivul, dar asta e cea mai logica presupunere avand in vedere mesajul de eroare pe care l-ai primit. Mai mult, stiu sigur ca pe alte site-uri cu evaluator online mai exista problema asta, tin minte ca mai demult tot luam CE pe Timus din cauza ca faceam sqrt(2) in loc de sqrt(2.). 
|
|
|
Memorat
|
Jump in the cockpit and start up the engines Remove all the wheelblocks there's no time to waste Gathering speed as we head down the runway Gotta get airborne before it's too late.
|
|
|
•Coty
|
 |
« Răspunde #29 : August 03, 2006, 18:44:06 » |
|
huh? se vede ca nu stiu C/C++... (si o sa urmeze replica lui svalentin "toate se invata candva"  )... mai am de sapat in el  desi am mai avut probleme din cauza asta  imi aduc aminte... dar atunci nu primisem eroare, ci doar warning... aia e  btw... ce ai dat tu paste e din man pages... nu? (nu de alta dar nu le am pe ubuntu  )
|
|
|
Memorat
|
|
|
|
•greco
|
 |
« Răspunde #30 : August 03, 2006, 19:03:21 » |
|
Da, e prima parte din "man sqrt".
|
|
|
Memorat
|
Jump in the cockpit and start up the engines Remove all the wheelblocks there's no time to waste Gathering speed as we head down the runway Gotta get airborne before it's too late.
|
|
|
•Coty
|
 |
« Răspunde #31 : August 03, 2006, 19:19:46 » |
|
a, btw... felicitari de rezultat!
|
|
|
Memorat
|
|
|
|
|
•Coty
|
 |
« Răspunde #33 : August 03, 2006, 20:07:46 » |
|
sorry  dar pe atunci nu era threadul. ms!
|
|
|
Memorat
|
|
|
|
•andrei_blanaru
Strain
Karma: 0
Deconectat
Mesaje: 8
|
 |
« Răspunde #34 : August 03, 2006, 20:49:08 » |
|
Mie mi-a placut concursul. Sper sa mai fie inca unul pana incepe scoala.
|
|
|
Memorat
|
"Tot ce este gandit corect este sau matematica, sau susceptibil de matematizare!" Grigore MOISIL
|
|
|
ditzone
Vizitator
|
 |
« Răspunde #35 : August 03, 2006, 21:58:11 » |
|
S-au pus si in arhiva problemele
|
|
|
Memorat
|
|
|
|
•Cosmin
|
 |
« Răspunde #36 : August 03, 2006, 22:02:03 » |
|
 multumim de aprecieri.
|
|
|
Memorat
|
|
|
|
•cristy
|
 |
« Răspunde #37 : August 04, 2006, 08:43:13 » |
|
tot asa cu concursurile... 
|
|
|
Memorat
|
... lipsa de inspiratie ...
|
|
|
|