Problem with code or gcc?

Kedzierski, Artur CIV NAVSURFWARCENDIV CORONA artur.kedzierski@navy.mil
Tue Sep 27 13:39:00 GMT 2005


	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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4051 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20050927/b5f2b924/attachment.bin>


More information about the Gcc-help mailing list