R
Rookie
Hi,
While compiling the following code I get a bundle of warnings. Can anyone
tell me why? Should I be using some option while compiling (right now I just
have g++ -o test.o test.cpp)? Or is it because I am using the wrong header?
If so which is the right header? Hope to hear from someone. Thanks!
Code:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <vector.h>
int main(int argc,char* argv[])
{
vector<int> test;
printf("test.size()=%d\n",test.size());
}
Warnings:
bash-2.05b$ g++ -o test.o test.cpp
In file included from
/usr/usc/gnu/gcc/3.3.2/include/c++/3.3.2/backward/vector.h:59,
from test.cpp:4:
/usr/usc/gnu/gcc/3.3.2/include/c++/3.3.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 <sstream> instead of the
deprecated header <strstream.h>. To disable this warning
use -Wno-deprecated.
bash-2.05b$
While compiling the following code I get a bundle of warnings. Can anyone
tell me why? Should I be using some option while compiling (right now I just
have g++ -o test.o test.cpp)? Or is it because I am using the wrong header?
If so which is the right header? Hope to hear from someone. Thanks!
Code:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <vector.h>
int main(int argc,char* argv[])
{
vector<int> test;
printf("test.size()=%d\n",test.size());
}
Warnings:
bash-2.05b$ g++ -o test.o test.cpp
In file included from
/usr/usc/gnu/gcc/3.3.2/include/c++/3.3.2/backward/vector.h:59,
from test.cpp:4:
/usr/usc/gnu/gcc/3.3.2/include/c++/3.3.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 <sstream> instead of the
deprecated header <strstream.h>. To disable this warning
use -Wno-deprecated.
bash-2.05b$