views:

103

answers:

2

In Java if you wanted all the classes in a namespace you could just do this:

import com.bobdylan.*;

Is there anyway I can get a result similar to:

import boost.*;

(except in C++)

+3  A: 

Not automatically. You can write a single header file that #includes all the other headers you are interested in, and then just #include that, but that's it - C++ has no "import" feature like java.

anon
* imports are not very popular anymore.
gpampara
A: 

You probably don't want to #include all of Boost -- it's a very large library, so just include what you need.

Also, a Neil says, there is no equivalent in C++ to the Java .* syntax, so you must either include them all manually, or write a single header that includes them all manually and include that.

Peter Alexander