Friday, July 31, 2009

Compilation error in DEV C++?

i compiled the following program





# include %26lt;conio.h%26gt;


# include %26lt;iostream.h%26gt;


int main ()


{





int a,b,c;


cout%26lt;%26lt; "enter the two numbers to be swapped";


cin%26gt;%26gt;a%26gt;%26gt;b;


a = c;


a = b;


b = c;


cout%26lt;%26lt;"the two respective numbers are now";


cout%26lt;%26lt;a%26lt;%26lt;b;


getch();





}





--------------------------------------...


i get the following errors





31 D:\DEV-CPP\include\c++\backward\iostream...


In file included from D:/DEV-CPP/include/c++/backward/iostream...





2 D:\Nakul\programs\swap.cpp


from D:/Nakul/programs/swap.cpp





2 D:\DEV-CPP\include\c++\backward\backward...


#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 %26lt;X%26gt; header for the %26lt;X.h%26gt; header for C++ includes, or %26lt;sstream%26gt; instead of the deprecated header %26lt;strstream.h%26gt;. To disable this warning use -Wno-deprecated.

Compilation error in DEV C++?
Hi


conio.h is an old MSDOS header file specific to microsoft.


You do not require that.


you should do #include %26lt;iostream%26gt; not #include %26lt;iostream.h%26gt;





iostream.h is for old C++ compilers which were made when the language standard wasnt complete.





Vivek


No comments:

Post a Comment