Re: error gcc compiling cpp file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Dec 13, 2003 at 12:23:01AM -0300, Hernan Fernandez wrote:
> Hi:               (sorry my english) :(

Try using "g++" innstead of "gcc", because you're compiling c++, not C.

> 
> i have this one.cpp file
> //-------------------------
> # include <iostream.h>
> # include <stdio.h>
> # include <conio.h>
>                                                                                                                                               void main()
> {
>  clrscr();
>  gotoxy(20,10);
>  cout<<"MI PRIMER PROGRAMA EN C++";
>  cout<<"\n\nPARA SALIR OPRIMA ENTER ";
>  getch();
>  }
> //-------------------------
> 
> i try compiling it! and i get a error :(
> 
> # gcc one.cpp -o one
> En el fichero incluído de /usr/include/c++/3.3.2/backward/iostream.h:31,
>                  de primer.cpp:1:
> /usr/include/c++/3.3.2/backward/backward_warning.h:32:2: aviso: #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 <sstream> instead of the deprecated header
> <strstream.h>. To disable this warning use -Wno-deprecated.
> primer.cpp:3:20: conio.h: No existe el fichero o el directorio
> primer.cpp:6: error: `main' must return `int'
> primer.cpp: En function `int main(...)':
> primer.cpp:7: error: `clrscr' undeclared (first use this function)
> primer.cpp:7: error: (Each undeclared identifier is reported only once
> for each
>    function it appears in.)
> primer.cpp:8: error: `gotoxy' undeclared (first use this function)
> primer.cpp:11: error: `getch' undeclared (first use this function)
> 
> i try too with g++ and i have the same error
> 
> Help please :D
> 
> -- 
> Hernan Fernandez
> uk@xxxxxxxxxxx
> 0-9 475 21 72
> Santiago - Chile
> 
> 
> --
> fedora-list mailing list
> fedora-list@xxxxxxxxxx
> To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list

-- 
---- Fred Smith -- fredex@xxxxxxxxxxxxxxxxxxxxxx -----------------------------
                    The Lord detests the way of the wicked 
                  but he loves those who pursue righteousness.
----------------------------- Proverbs 15:9 (niv) -----------------------------

Attachment: pgpdw9cRBuISk.pgp
Description: PGP signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux