RE: Problem with code or gcc?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.11


Regards,
 
Ryan Mansfield
 

-----Original Message-----
From: gcc-help-owner@xxxxxxxxxxx [mailto:gcc-help-owner@xxxxxxxxxxx] On
Behalf Of Kedzierski, Artur CIV NAVSURFWARCENDIV CORONA
Sent: Tuesday, September 27, 2005 9:40 AM
To: gcc-help@xxxxxxxxxxx
Subject: Problem with code or gcc?

	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

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux