Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#Actualbluepig.man

Posted 01 October 2013 - 07:16 PM

If I understand your question correctly, you're asking why the keywords of C++ do not need a header file.  

 

Simply, they are a part of the language.  A compiler / parser is essentially hard-coded with the rules it needs to understand what keywords are, and what it is supposed to do with them.  Several international C++ standards exist which give precise definitions, depending on the version of C++ you're using.  

 

While it might be possible for a tool to construct a language from a set of rules, such as the keywords, you would have to require that tool to have certain rules to understand those definitions.  At some point a tool must have some set of basic definitions for it to do its job.  And that's what keywords partially represent -- an internal skeleton that guides the parsing / compiling processes to choose the appropriate rules when translating your code.

Nice answer!  Before ask this question, l think if we want use something from language we must include some header file,but yesterdayl try to remove any header in my source file,then no error is reported.  This break my cognitive.  Your answer is very nice for me, thanks.


#2bluepig.man

Posted 01 October 2013 - 07:14 PM

If I understand your question correctly, you're asking why the keywords of C++ do not need a header file.  

 

Simply, they are a part of the language.  A compiler / parser is essentially hard-coded with the rules it needs to understand what keywords are, and what it is supposed to do with them.  Several international C++ standards exist which give precise definitions, depending on the version of C++ you're using.  

 

While it might be possible for a tool to construct a language from a set of rules, such as the keywords, you would have to require that tool to have certain rules to understand those definitions.  At some point a tool must have some set of basic definitions for it to do its job.  And that's what keywords partially represent -- an internal skeleton that guides the parsing / compiling processes to choose the appropriate rules when translating your code.

Nice answer!  Before ask this question, l think if we want use something from language we must include some header file,but yesterdayl try to remove any header in my source file,then no error is reported. Your answer is very nice thanks.


#1bluepig.man

Posted 01 October 2013 - 07:13 PM

If I understand your question correctly, you're asking why the keywords of C++ do not need a header file.  

 

Simply, they are a part of the language.  A compiler / parser is essentially hard-coded with the rules it needs to understand what keywords are, and what it is supposed to do with them.  Several international C++ standards exist which give precise definitions, depending on the version of C++ you're using.  

 

While it might be possible for a tool to construct a language from a set of rules, such as the keywords, you would have to require that tool to have certain rules to understand those definitions.  At some point a tool must have some set of basic definitions for it to do its job.  And that's what keywords partially represent -- an internal skeleton that guides the parsing / compiling processes to choose the appropriate rules when translating your code.

Nice answer!  Before ask this question, l think if we want use something from language we must include some header file,but today l try to remove any header in my source file,then no error is reported. Your answer is very nice thanks.


PARTNERS