Titlul: Suma divizorilor Scris de: A Cosmina - vechi din Aprilie 12, 2009, 14:48:55 Salut! :) Am rezolvat si eu o problema pe forum si nu inteleg de ce imi afiseaza eroare de compilare.La mine pe calculator functioneaza perfect! As avea nevoie de niste lamuriri, verau sa castig si eu puncte.
Aceasta este sursa: Cod: #include <fstream.h> Iar acestea erorile: Citat Eroare de compilare: In file included from /usr/include/c++/4.2/backward/fstream.h:31, from user.cpp:1: /usr/include/c++/4.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated. user.cpp:2:19: error: conio.h: No such file or directory user.cpp: In function 'int main()': user.cpp:6: error: 'clrscr' was not declared in this scope user.cpp:7: error: 'ios' has not been declared user.cpp:7: error: 'ios' has not been declared Titlul: Răspuns: Suma divizorilor Scris de: Andrei Misarca din Aprilie 12, 2009, 14:56:19 clrscr nu este recunoscuta de compilator(de altfel nici nu inteleg de ce o folosesti), iar cand deschizi fisierele foloseste ifstream si ofstream :)
Titlul: Răspuns: Suma divizorilor Scris de: A Cosmina - vechi din Aprilie 12, 2009, 15:00:19 adica ceva de genul asta:
Cod: istream f("sumdiv.un"); asta-i tot? pot sa o pun din nou? Titlul: Răspuns: Suma divizorilor Scris de: Andrei Grigorean din Aprilie 12, 2009, 16:22:15 Poti sa o pui din nou, dar ai grija sa nu incluzi conio.h
Titlul: Răspuns: Suma divizorilor Scris de: A Cosmina - vechi din Aprilie 12, 2009, 16:32:02 Eroare de compilare:
In file included from /usr/include/c++/4.2/backward/fstream.h:31, from user.cpp:1: /usr/include/c++/4.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated. user.cpp: In function 'int main()': user.cpp:5: error: 'ios' has not been declared user.cpp:5: error: 'ios' has not been declared Titlul: Răspuns: Suma divizorilor Scris de: Paul-Dan Baltescu din Aprilie 13, 2009, 09:57:25 Include librariile <iostream> si <fstream> (fara .h) si adauga "using namespace std;" (inainte de int main() undeva).
Titlul: Răspuns: Suma divizorilor Scris de: A Cosmina - vechi din Aprilie 13, 2009, 10:02:44 si <math.h> ramane cu h?
in compilator nu-mi accepta <iostream> si <fstream> ??? Titlul: Răspuns: Suma divizorilor Scris de: Paul-Dan Baltescu din Aprilie 13, 2009, 10:12:58 Lucrezi in Borland C?
Titlul: Răspuns: Suma divizorilor Scris de: A Cosmina - vechi din Aprilie 13, 2009, 10:19:12 da, am inlocuit fstream f("sumdiv.in",ios::in) etc...
cu ifstream si ofstream. sa vad daca merge edit: Citat Compilare: In file included from /usr/include/c++/4.2/backward/fstream.h:31, from user.cpp:1: /usr/include/c++/4.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated. |