I'm getting warning as following when I compile two cpp files. These are not my files it happened I found them at http://www.functionx.com/cpp/examples/simpleclass.htm
as I was trying to learn how "ctags" works in VIM or vi
In order to compile and run I use:
$g++ Exo.cpp Cube.cpp -o test
1) What caueses warning and how can I fix it? currently I have output which works fine but need to know how to get rid of this warnnig.
2)Does anybody know how I can use ctags in vim? any good resource with example?
Source is at snippet window but error message is:
In file included from /usr/lib/gcc/i386-redhat-l
2:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 22.214.171.124 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.
Header File: cube.h
void setSide(double s);
Source File cube.cpp
void Cube::setSide(double s)
Side = s <= 0 ? 1 : s;
return 6 * Side * Side;
return Side * Side * Side;
cout << "Characteristics of this cube";
cout << "\nSide = " << getSide();
cout << "\nArea = " << Area();
cout << "\nVolume = " << Volume() << "\n\n";
Main File: Exo.cpp