PDA

View Full Version : what is #include<vector>



c2tarun
January 27th, 2011, 03:30 AM
Whenever I go through any program on any website or on net, I generally see


#include<vector>

Can anyone please explain me what is it? :(
Is it really good?

cgroza
January 27th, 2011, 03:38 AM
It allows you to use the vector class, which is kind of like enhanced arrays. The #include preprocessor simply "throws" the contents of the file in the current file for compile time. It is similar to the import statement in python and java.

dileepm
January 27th, 2011, 08:12 AM
I think that should be #include<vector.h>

Vaphell
January 27th, 2011, 08:23 AM
standard C++ lib header files don't have .h extension

http://www.cppreference.com/wiki/

slavik
January 27th, 2011, 03:01 PM
http://lmgtfy.com/?q=%23include%3Cvector%3E

muteXe
January 27th, 2011, 03:03 PM
Stuff like vectors and lists (and maps I think?) are called container classes:
http://www.yolinux.com/TUTORIALS/LinuxTutorialC++STL.html