Problems compiling kio/tests/dataprotocoltest.cpp

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Fri Nov 4 07:07:49 GMT 2005


Hi,

And once more a problem with msvc...
I get a compile error in line 202 and below because of the empty
initialization of exp_attrs[10] -> 'elements of partially initialized array
must have a default constructor' and 'no appropriate default constructor
available'. The problem here is the second 'const'.
Changing the struct to

const struct {
const char * name;
const char * exp_mime_type;
const struct {
	const char * key;
	const char * value;
} exp_attrs[10];
const char * exp_content;
const char * url;
} testcases[]

and all works fine.
So my question - do you really need the second const and what is it good
for?

Christian

-- 
Highspeed-Freiheit. Bei GMX supergünstig, z.B. GMX DSL_Cityflat,
DSL-Flatrate für nur 4,99 Euro/Monat*  http://www.gmx.net/de/go/dsl




More information about the kde-core-devel mailing list