extern "C" int x; //is just a declaration extern "C" { int y; } //is a definitionThere are two different forms of the extern "C" declaration:
- extern "C" void run()
- extern "C" { … } with the declarations between the braces.
The following two declarations are equivalent:
extern "C" int foo;
extern "C" void bar();
andextern "C" {
extern int foo;
extern void bar();
}
extern "C" int foo;
and
extern "C" {
int foo;
}
are not the same thing.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.