Jump to content
  • Advertisement

magic_man

Member
  • Content Count

    199
  • Joined

  • Last visited

Community Reputation

54 Neutral

About magic_man

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. magic_man

    Header Files

    I will leave you with this parting gift. wrong [color="#1c2837"] Yes it does. [color="#000000"] [color="#1c2837"] wrong [color="#1c2837"] [color="#1c2837"] [color="#1c2837"]Reputation of 1000+ equals helpfull. Reputation of 0 equals unhelpfull. [color="#1c2837"][/quote] [color="#1c2837"]Wrong Now then lets have some facts and then question why you are voting for incorrect answers. C99 6.10.2 Source file inclusion Constraints 1 A #include directive shall identify a header or source file that can be processed by the implementation. Semantics 2 A preprocessing directive of the form # include <h-char-sequence> new-line searches a sequence of implementation-defined places for a header identified uniquely by the specified sequence between the < and > delimiters, and causes the replacement of that directive by the entire contents of the header. How the places are specified or the header identified is implementation-defined. 3 A preprocessing directive of the form # include "q-char-sequence" new-line causes the replacement of that directive by the entire contents of the source file identified by the specified sequence between the " delimiters. The named source file is searched for in an implementation-defined manner. If this search is not supported, or if the search fails, the directive is reprocessed as if it read # include <h-char-sequence> new-line with the identical contained sequence (including > characters, if any) from the original directive. 142) As indicated by the syntax, a preprocessing token shall not follow a #else or #endif directive before the terminating new-line character. However, comments may appear anywhere in a source file, including within a preprocessing directive. §6.10.2 Language 149 7 8 EXAMPLE 1 The most common uses of #include preprocessing directives are as in the following: #include <stdio.h> #include "myprog.h" EXAMPLE 2 This illustrates macro-replaced #include directives: #if VERSION == 1 #define INCFILE "vers1.h" #elif VERSION == 2 #define INCFILE "vers2.h" // and so on #else #define INCFILE "versN.h" #endif #include INCFILE Forward references: macro replacement (6.10.3). 143) Note that adjacent string literals are not concatenated into a single string literal (see the translation phases in 5.1.1.2); thus, an expansion that results in two string literals is an invalid directive. ISO/IEC 9899:1999 (E) ©ISO/IEC 4 A preprocessing directive of the form # include pp-tokens new-line (that does not match one of the two previous forms) is permitted.(OO who would have thought) The preprocessing tokens after include in the directive are processed just as in normal text. (Each identifier currently defined as a macro name is replaced by its replacement list of preprocessing tokens.) The directive resulting after all replacements shall match one of the two previous forms.143) The method by which a sequence of preprocessing tokens between a < and a > preprocessing token pair or a pair of " characters is combined into a single header name preprocessing token is implementation-defined. 5 The implementation shall provide unique mappings for sequences consisting of one or more letters or digits (as defined in 5.2.1) followed by a period (.) and a single letter. The first character shall be a letter. The implementation may ignore the distinctions of alphabetical case and restrict the mapping to eight significant characters before the period. 6 A #include preprocessing directive may appear in a source file that has been read because of a #include directive in another file, up to an implementation-defined nesting limit (see 5.2.4.1).[/quote] C++ 2003 16.2 Source file inclusion [cpp.include] 1 A #include directive shall identify a header or source file that can be processed by the implementation. 2 A preprocessing directive of the form # include <h-char-sequence> new-line searches a sequence of implementation-defined places for a header identified uniquely by the specified sequence between the < and > delimiters, and causes the replacement of that directive by the entire contents of the header. How the places are specified or the header identified is implementation-defined. 3 A preprocessing directive of the form # include "q-char-sequence" new-line causes the replacement of that directive by the entire contents of the source file identified by the specified sequence between the " delimiters. The named source file is searched for in an implementation-defined manner. If this search is not supported, or if the search fails, the directive is reprocessed as if it read # include <h-char-sequence> new-line with the identical contained sequence (including > characters, if any) from the original directive. 4 A preprocessing directive of the form # include pp-tokens new-line (that does not match one of the two previous forms) is permitted(And again OOOO). The preprocessing tokens after include __________________ 138) Thus, the constant expression in the following #if directive and if statement is not guaranteed to evaluate to the same value in these two contexts. #if ’z’ - ’a’ == 25 if (’z’ - ’a’ == 25) 139) As indicated by the syntax, a preprocessing token shall not follow a #else or #endif directive before the terminating new-line character. However, comments may appear anywhere in a source file, including within a preprocessing directive. 309 ISO/IEC 14882:2003(E) ? ISO/IEC 16.2 Source file inclusion 16 Preprocessing directives in the directive are processed just as in normal text (each identifier currently defined as a macro name is replaced by its replacement list of preprocessing tokens). If the directive resulting after all replacements does not match one of the two previous forms, the behavior is undefined.140) The method by which a sequence of preprocessing tokens between a < and a > preprocessing token pair or a pair of " characters is combined into a single header name preprocessing token is implementation-defined. 5 The mapping between the delimited sequence and the external source file name is implementation-defined. The implementation provides unique mappings for sequences consisting of one or more nondigits (2.10) followed by a period (.) and a single nondigit. The implementation may ignore the distinctions of alpha- betical case. 6 A #include preprocessing directive may appear in a source file that has been read because of a #include directive in another file, up to an implementation-defined nesting limit. 7 [Example: The most common uses of #include preprocessing directives are as in the following: #include <stdio.h> #include "myprog.h" —end example] [/quote] [color="#1c2837"]And finally [color="#1c2837"][color=#1C2837][size=2]Bye![/quote] [color=#1C2837][size=2]Correct
  2. magic_man

    Header Files

    I see. What gamedev wants is damn right lazy people posting lazy questions that do not show they have tried to find the answer for themselves. I think you will find my answer to look in the standard is net etiquette for lazy bastards wanting information ie RTFM. To imply that I was rude or anything even close I find an insult, look again at my post it twice uses the word please and even requests that if the standard is not understood then ask another question. I would like you to clarify where I was "Aggressive, combative, [or] rude " but never mind all is well, I do not need gamedev just as much as it seems the gamedev community does not want correct answers.
  3. magic_man

    Header Files

    OK this thread confuses me somewhat. Factually incorrect information gets voted up and factually correct information which asks the lazy OP to do some leg work themselves gets voted down? With a post about headlights also getting voted up. Erm let me check again is this the Lounge! [color="#1C2837"]Why don't we just close every pure C++ thread - since the correct answers are all in the standard. [/quote] [color="#1C2837"]That sounds like an excellent idea but what in the OP's post says it is C++?
  4. magic_man

    Header Files

    Me? Yes thanks, is there a difference between the draft and the final here IIRC the C++ standard uses pretty much the same word for word description as C99. Q: "How do I turn on the headlights?" A: "Please consult Feynman's 4-part works on physics" [/quote] Where are the headlights? As for [color=#1C2837][size=2]The standard is no place for an inexperienced programmer. [/quote] [color=#1C2837][size=2]I consider this wrong but if the user had posted in "For Beginners" then maybe I would have answered differently
  5. magic_man

    Header Files

    The standard is no place for an inexperienced programmer. [/quote] Incorrect replies like yours have no place at all. The short story is that it is implementation defined where each of these look for files and even that they may look in the same place.
  6. magic_man

    Header Files

    Please look in the standard! If you have a question after that then please post it.
  7. [color="#1C2837"]I personally do this a lot. Many times I'm faced with something I don't know or understand and I start making random assemblings and trials until it starts working. I sometimes think of it as a kind of "genetic algorithm" way of doing things. [/quote] [color="#1c2837"]Fumbling in the dark is another way to look at this. What ever happened to craftsmanship ?
  8. magic_man

    Site mobile interface

    Lack of uploading capability is an iPhone issue. The attach image option with flash can be turned off though if you edit your account settings and switch back to basic uploading. [/quote] Well I am not on an iDevice so will reply to that now, to say I did try that [color=#1C2837][size=2] O no problem you can use the alternative upload method, well that does not seem to work either.[/quote]
  9. magic_man

    Site mobile interface

    I do not know what device you used to load the front page yet it is the same error on iDevices, I would upload an image of the error yet there are no options which allow this from the mobile interface and in normal mode it requires hosting it externally as the attach image option does not work as it requires flash. O no problem you can use the alternative upload method, well that does not seem to work either. This wil be my last post on the matter your interface is so fucked up and frustrating that I will no longer use it when mobile. Is this how it is really meant to be for mobile devices, is this some/ any sort if improvement, just how difficult is it to be able to view a page on a mobile browser and upload an image.
  10. magic_man

    Site mobile interface

    OK is there a joke I am missing here as this is still not addressed. I guess some work has been done on the file as the error now lists that the call is on line 14741 instead of [font="Times"][color="#1c2837"]14575 but this has gone beyond the point of a joke and is now complete and utter incompetence! It is the front page FFS.[/font]
  11. magic_man

    Site mobile interface

    Using the full version seems to be mostly fixed only when a user is logged in yet the mobile interface is still broken. Good job the front page is not a landing page and people don't need to bookmark another page to view the site.
  12. magic_man

    Osama Bin Laden is Dead.

    I really do not understand why some people have hatred for Americans. What about Interpol? Are they not the world's police force whilst American is the world's current biggest bully and warmonger.
  13. magic_man

    Which license to use?

    Not so fast Suyash how are you linking to SDL, DevIL and Audiere? Have you made any changes to those libraries?
  14. magic_man

    [c++] linker & headers problems

    Why do you have the following code, as your code will not compile using C due to std::string, the string include and the sstream include? #ifdef __cplusplus #include <cstdlib> #else #include <stdlib.h> #endif
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!