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]

Re: gcc4.1.0: error: object missing in reference to


On Dec 5, 2006, at 9:52 AM, John Love-Jensen wrote:

Hi Fabian,

Well, I didn't know that. I thought it may be "not that good" but still valid.
But we'll stay with C++ :) Do you know a link where this is explained?
There are many C++ references out there, but I can't find this case.

I don't have a link, but I can cite the standard which states what is acceptable for the sizeof operator: ISO 14882 section 5.3.3

I see... So I could do this:


#include <iostream>
using namespace std;

struct foo
{
    typedef char buf_type[1024];

    buf_type buf;
};

int main()
{
    cout << sizeof(foo::buf_type) << endl;
}

Perry Smith ( pedz@easesoftware.com )
Ease Software, Inc. ( http://www.easesoftware.com )

Low cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX systems



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]