![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#21 |
|
Newbie
Join Date: Nov 2004
Posts: 12
Rep Power: 0
![]() |
When you use
using namespace std; using std::cout; using std::cin; |
|
|
|
|
|
#22 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Eh? I always assumed that just enabled you to use elements of a template without having to type its name each time. The space is taken up with this line: #include <iostream>.
|
|
|
|
|
|
#23 |
|
Professional Programmer
Join Date: Nov 2004
Posts: 250
Rep Power: 4
![]() |
>I always assumed that just enabled you to use elements of a template without having to type its name each time.
It makes every name in the namespace visible in the global namespace without qualification. The names don't have to be templates. >The space is taken up with this line: #include <iostream>. Yes. The using directive only deals in visibility; it's the dependencies of the header that will effect file size. For example, if iostream also included fstream, string, and cstdlib then the translation unit size would be equivalent to the sum union of all of the header sizes. Also, the static library referenced by each header would be linked into the executable and the size would reflect that. A well written library will minimize dependencies to speed up compilation and shrink translation unit and executable file sizes, but not all standard library implementations are that good. ![]() |
|
|
|
|
|
#24 |
|
Programmer
Join Date: Nov 2004
Location: Bierut - Lebanon
Posts: 34
Rep Power: 0
![]() |
well all these are good sugestions that i intend to try one by one to have the best benefit of C++
its confusing how a famous language like this can cause much trouble :blink:
__________________
<removed by Administrator> |
|
|
|
|
|
#25 |
|
Professional Programmer
Join Date: Nov 2004
Posts: 250
Rep Power: 4
![]() |
>its confusing how a famous language like this can cause much trouble
Quality of implementation issues exist everywhere. It's most evident with languages like C and C++ that are very popular and have many different implementations of the standard language (both open source and retail). If you can't find a way around the problem then complain to the vendor. Header dependencies are their mistake and they should fix it. You shouldn't have to switch from C++ to C just to get smaller binaries. ![]() |
|
|
|
|
|
#26 |
|
Programmer
Join Date: Nov 2004
Location: Bierut - Lebanon
Posts: 34
Rep Power: 0
![]() |
well i'm really thinking about mailing DEV_CPP creators maybe they'lle find a sollution !
__________________
<removed by Administrator> |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|