[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: YA daft C++ q
From: Rik Hemsley <rik () rikkus ! demon ! co ! uk>
Date: 1999-06-22 20:28:53
[Download RAW message or body]
Ok, seeing as people are talking about using namespaces, I'm presuming it's ok
to use them now.
I had a class which I was using as a namespace, with some enums, static
methods, and some of this:
static const QCString monthNames[]
I define the above in the .cpp file:
const QCString RMM::monthNames[] = { "Jan", "Feb" ... }
Now if I change the class to a namespace:
namespace RMM {
static const QCString monthNames[];
...
};
While the .cpp is still compiled to an object, and it's unchanged, I get
undefined reference on linking to the QCString arrays.
The enums are ok, the static methods are converted to non-static, and they're
ok, it's just the arrays.
Anyone know what I'm doing wrong ?
Note: Putting 'using RMM;' at the top of the .cpp doesn't work. Should it ? I'm
just leaving the 'RMM::' on everything for now.
Cheers,
Rik
--
KDE - Colour outside the lines : http://www.kde.org
[[without]] - software for KDE : http://without.netpedia.net
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic