Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > why this code n...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 43797 of 47562
Post > Topic >>

why this code not work

by Jim Johnson <aopiyy001@[EMAIL PROTECTED] > Mar 10, 2008 at 08:11 PM

why the struct must be 
===================
typedef struct {
    ... etc ..
} SetupRecord;

CANNOT be ...
===================
struct {
    ... etc ..
} SetupRecord;

===================
static const SetupRecord g_SetupRecordTable[] = {
	{ TEST1, "gggg"}, 
};

===================
1>main.cpp
1>d:\remote3\remote\remotedemo\app\remotedemo\main.cpp(10) : error
C4430: missing type specifier - int assumed. Note: C++ does not
sup****t default-int
1>d:\remote3\remote\remotedemo\app\remotedemo\main.cpp(10) : error
C2146: syntax error : missing ';' before identifier
'g_SetupRecordTable'
1>d:\remote3\remote\remotedemo\app\remotedemo\main.cpp(10) : error
C2373: 'SetupRecord' : redefinition; different type modifiers
1>        d:\remote3\remote\remotedemo\app\remotedemo\main.cpp(8) :
see declaration of 'SetupRecord'
1>d:\remote3\remote\remotedemo\app\remotedemo\main.cpp(10) : error
C4430: missing type specifier - int assumed. Note: C++ does not
sup****t default-int
1>d:\remote3\remote\remotedemo\app\remotedemo\main.cpp(11) : error
C2078: too many initializers
 




 5 Posts in Topic:
why this code not work
Jim Johnson <aopiyy001  2008-03-10 20:11:51 
Re: why this code not work
Ian Collins <ian-news@  2008-03-11 17:13:48 
Re: why this code not work
James Kanze <james.kan  2008-03-11 03:58:26 
Re: why this code not work
Michael.Boehnisch@[EMAIL   2008-03-11 04:48:58 
Re: why this code not work
Jim Johnson <aopiyy001  2008-03-11 11:43:24 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Sep 7 7:53:02 CDT 2008.