|
From: FC.Yogesh on 24 Apr 2008 11:54 Hi, I'm facing the silly problem. In my header file, a namespace is declared and used it in the project. VS2003 is not compiling the project giving more than 100 same errors pointing at inbuilt file. “C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include \cstdio(17) : error C2143: syntax error : missing '{' before ':'” it is similar to the problem http://groups.google.co.uk/group/microsoft.public.vc.language/browse_thread/thread/b63e0207f2741d7d/61bc8b0aa4a3ad49 Please suggest the solution ! Thanks & Regards, -Yogesh.
From: Ulrich Eckhardt on 25 Apr 2008 04:30 FC.Yogesh wrote: > “C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include > \cstdio(17) : error C2143: syntax error : missing '{' before ':'†> > it is similar to the problem > http://groups.google.co.uk/group/microsoft[...] > > Please suggest the solution ! I'd suggest a similar solution to that which is in this thread. Other than that, it would actually be helpful to supply all relevant information. Uli -- C++ FAQ: http://parashift.com/c++-faq-lite Sator Laser GmbH Geschäftsführer: Michael Wöhrmann, Amtsgericht Hamburg HR B62 932
From: Anders Karlsson on 25 Apr 2008 21:04 On Thu, 24 Apr 2008 08:54:38 -0700 (PDT), "FC.Yogesh" <bodhankaryogesh(a)gmail.com> wrote: > Hi, > > I'm facing the silly problem. > In my header file, a namespace is declared and used it in the project. > VS2003 is not compiling the project giving more than 100 same errors > pointing at inbuilt file. > �C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include > \cstdio(17) : error C2143: syntax error : missing '{' before ':'� > > it is similar to the problem > http://groups.google.co.uk/group/microsoft.public.vc.language/browse_thread/thread/b63e0207f2741d7d/61bc8b0aa4a3ad49 > > Please suggest the solution ! > > Thanks & Regards, > -Yogesh. Normally it is not a good idea to have 'using namespace' in a header, because names in the namespace could clash with other namespaces who also think they are 'unique'. It is better to write 'using namespace' in your .cpp and keep the namespace prefix in your headers. e.g. std::string /Anders. -- A: People bitching about top-posting > Q: What's the most annoying thing on USENET?
|
Pages: 1 Prev: what is type specifier to print unsigned long long Next: member function level dll export |