PDA

View Full Version : Question about C



stamatiou
June 18th, 2011, 09:51 AM
Hey guys,
in a piece of code, I have seen the main function divided by two, something like that:



main()
{
blablablabla;
}
/* a comment */
{
blablabla;
}

BkkBonanza
June 18th, 2011, 11:19 AM
Were you intending to ask a question?
Or just let us know you saw something strange...

simeon87
June 18th, 2011, 11:55 AM
It seems unlikely that that's what you've seen. Did it compile correctly?

dwhitney67
June 18th, 2011, 12:14 PM
It seems unlikely that that's what you've seen. Did it compile correctly?

I concur.

What the OP probably saw was something like:


int main()
{
some declarations;

some statements;

{
some declarations;

some statements;
}

more statements;
}