>
>
> I currently have an example of using namespaces
>
> #include <iostream>
>
> int main( int argc, char** argv )
> {
> std::cout << _T("Using standard namespace") << std::endl;
> return 0;
> }
>
>
> could anyone give me another example NOT using cout ? Perhaps with a
> vector?
> The standard namespace is all I have experience with.
>
> Thanks in advance,
> Daniel
>
Hi,
here ist one:
#ifndef PROCABI_H
#define PROCABI_H
#include <vector>
class TProzessfaehigkeit {
typedef std::vector<double>::size_type vec_sz;
std::vector<double> TMW;
bool valid();
double sx; // sum x
double sxx; // sum sqr(x)
public:
[...]
};
#endif
Thats the Header.
In the implementation file you need:
using namespace std;
or better
using std::vector;
and then you can write e.g.:
int TProzessfaehigkeit::calc() {
typedef vector<double>::iterator vec_it;
[...]
}
Horst
--
Horst Rößner
Postf. 1802
52205 Stolberg
ICQ ID #74808448
h.r...@gm...
h.g...@t-...
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!
|