This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Could anybody tell me if this is a valid C++ code or
a problem with GCC?
test_prog.cc:
#include <vector>
struct MyStruct {
static const int CONST = 1;
};
int main() {
std::vector<int> l;
MyStruct z;
l.push_back(z.CONST);
}
I get an undefined reference to MyStruct::CONST when
I try to compile it.
I appreciate any help.
Artur Kedzierski
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |