From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18854 invoked by alias); 27 Sep 2005 14:12:08 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 18692 invoked by uid 22791); 27 Sep 2005 14:11:57 -0000 Received: from qnxmail.qnx.com (HELO nimbus.ott.qnx.com) (209.226.137.76) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 27 Sep 2005 14:11:57 +0000 Received: by nimbus.ott.qnx.com with Internet Mail Service (5.5.2653.19) id ; Tue, 27 Sep 2005 10:11:55 -0400 Message-ID: <3518719F06577C4F85DA618E3C37AB9101824BE3@nimbus.ott.qnx.com> From: Ryan Mansfield To: "Kedzierski, Artur CIV NAVSURFWARCENDIV CORONA" , gcc-help@gcc.gnu.org Subject: RE: Problem with code or gcc? Date: Tue, 27 Sep 2005 14:12:00 -0000 MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2005-09/txt/msg00184.txt.bz2 http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.11 Regards, Ryan Mansfield -----Original Message----- From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On Behalf Of Kedzierski, Artur CIV NAVSURFWARCENDIV CORONA Sent: Tuesday, September 27, 2005 9:40 AM To: gcc-help@gcc.gnu.org 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 struct MyStruct { static const int CONST = 1; }; int main() { std::vector 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