use use of namespace `error' as expression

2005-05-17 Thread tispratik
[EMAIL PROTECTED] ErrorHandler]# make g++ -g -c -ansi -Wall -I /root/Desktop/synthesis/ls -I /root/Desktop/synthesis/mg CSynthesisMessage.cpp -o CSynthesisMessage.o In file included from /usr/include/c++/3.2.2/bits/codecvt.h:334, from /usr/include/c++/3.2.2/bits/locale_facets.h:42

Re: how to make a static function a friend of a class

2005-05-17 Thread Maett
Maett wrote: Larry I Smith wrote: Maett wrote: Hi. I would like to access private class data out of a static function as follows: foo1.h: class foo1Class { public: static int getN(); private: friend int ::foo1(); // friend int foo1(); static const int n; }; f

Re: template argument required

2005-05-17 Thread Larry I Smith
Patrick Rammelt wrote: Larry I Smith wrote: 'class' should not be required. In fact, it may confuse the issue (on some compilers). Try: A & foo (X p) { ... } Yes, that works too. Thanks again. Now I have three working and one non-working version: Working: class A& foo (X p) { ... } // 1

Re: how to make a static function a friend of a class

2005-05-17 Thread Larry I Smith
Maett wrote: [snip] But I would like foo1 to be static to avoid it being a global symbol. (I have a tool which generates c++ code out of data structure definitions, and there are quite a few such definitions, which would lead to manymany global symbols. [snip] This entire discussion is off-topi

Re: template argument required

2005-05-17 Thread Patrick Rammelt
Larry I Smith wrote: 'class' should not be required. In fact, it may confuse the issue (on some compilers). Try: A & foo (X p) { ... } Yes, that works too. Thanks again. Now I have three working and one non-working version: Working: class A& foo (X p) { ... } // 1) A& foo (X p) {... }

Re: how to make a static function a friend of a class

2005-05-17 Thread Larry I Smith
Maett wrote: Larry I Smith wrote: Maett wrote: Hi. I would like to access private class data out of a static function as follows: foo1.h: class foo1Class { public: static int getN(); private: friend int ::foo1(); // friend int foo1(); static const int n; }; f

Re: how to make a static function a friend of a class

2005-05-17 Thread Maett
Larry I Smith wrote: Maett wrote: Hi. I would like to access private class data out of a static function as follows: foo1.h: class foo1Class { public: static int getN(); private: friend int ::foo1(); // friend int foo1(); static const int n; }; foo1.cpp: #in

Re: how to make a static function a friend of a class

2005-05-17 Thread Larry I Smith
Maett wrote: Hi. I would like to access private class data out of a static function as follows: foo1.h: class foo1Class { public: static int getN(); private: friend int ::foo1(); // friend int foo1(); static const int n; }; foo1.cpp: #include "foo1.h" con

how to make a static function a friend of a class

2005-05-17 Thread Maett
Hi. I would like to access private class data out of a static function as follows: foo1.h: class foo1Class { public: static int getN(); private: friend int foo1(); static const int n; }; foo1.cpp: #include "foo1.h" const int foo1Class::n = 77; int foo1Class::getN

Re: Segmentation Fault

2005-05-17 Thread Lionel B
"Christian Christmann" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I'm having a scientific program which is said to > be running on both Linux and Solaris. > When I compile and run the program on Linux > with gcc3.2.3 everything is fine. > On Solaris, I'm using gcc3.2.1.