• Advertisement

magic_man

Member
  • Content count

    199
  • Joined

  • Last visited

Community Reputation

54 Neutral

About magic_man

  • Rank
    Member
  1. Header Files

    I will leave you with this parting gift. [quote name='rip-off' timestamp='1306409827' post='4815995'] Short story: The angle bracket version is for external header files, the quotation marks are for your own header files. See [url="http://msdn.microsoft.com/en-us/library/36k2cdd4(v=vs.80).aspx"]here[/url] for a full explanation. [/quote] [b]wrong[/b] [quote name='owl'] [color="#1c2837"][size="2"]It seems to be troll's month, meh.[/size][size="2"][/quote][/size][/color] [color="#1c2837"] [size="2"]Yes it does.[/size] [size="2"][color="#000000"][size="3"] [quote name='owl'][/size] [size="2"][color="#1c2837"] [/color][/size][/color][/size][size="2"]includes with < > is to load include files relative the include directory you tell your compiler to look up for. (in VS there is a configuration option that is Include Directory or something). (-I from the command line?)[/size][size="2"]includes with "" is to load include files relative to your project's directory.[/size][size="2"][/quote][/size][/color] [color="#1c2837"] [size="2"][b]wrong[/b][/size][/color] [color="#1c2837"][size="2"][b] [/b][/size][/color] [color="#1c2837"][size="2"][b] [/b][/size][/color] [color="#1c2837"][size="2"][/size][size="2"][b][quote]Reputation of [b]1000+[/b] equals helpfull. Reputation of [b]0[/b] equals unhelpfull.[/b][/size][/color] [color="#1c2837"][size="2"][/quote][/size][/color] [color="#1c2837"][size="2"][b]Wrong[/b] [/size][size="2"]Now then lets have some facts and then question why you are voting for incorrect answers.[/size] [size="2"]C99[/size][size="2"][quote][/size] [size="2"]6.10.2 Source file inclusion [/size] [size="2"]Constraints[/size] [size="2"]1 A #include directive shall identify a header or source file that can be processed by the implementation.[/size] [size="2"]Semantics[/size] [size="2"]2 A preprocessing directive of the form[/size] [size="2"]# include <h-char-sequence> new-line[/size] [size="2"]searches a sequence of [b]implementation-defined[/b] 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 [b]implementation-defined[/b].[/size] [size="2"]3 A preprocessing directive of the form[/size] [size="2"]# include "q-char-sequence" new-line[/size] [size="2"]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 [b]implementation-defined[/b] manner. If this search is not supported, or if the search fails, the directive is reprocessed as if it read[/size] [size="2"]# include <h-char-sequence> new-line with the identical contained sequence (including > characters, if any) from the original[/size] [size="2"]directive.[/size] [size="2"]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.[/size] [size="2"]§6.10.2 Language 149[/size] [size="2"]7[/size] [size="2"]8[/size] [size="2"]EXAMPLE 1 The most common uses of #include preprocessing directives are as in the following: #include <stdio.h>[/size] [size="2"]#include "myprog.h" EXAMPLE 2 This illustrates macro-replaced #include directives:[/size] [size="2"]#if VERSION == 1 #define INCFILE "vers1.h"[/size] [size="2"]#elif VERSION == 2 #define INCFILE "vers2.h" // and so on[/size] [size="2"]#else[/size] [size="2"]#define INCFILE "versN.h" #endif[/size] [size="2"]#include INCFILE[/size] [size="2"]Forward references: macro replacement (6.10.3).[/size] [size="2"]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.[/size] [size="2"]ISO/IEC 9899:1999 (E) ©ISO/IEC[/size] [size="2"]4 A preprocessing directive of the form[/size] [size="2"]# include pp-tokens new-line[/size] [size="2"](that does not match one of the two previous forms) is permitted.[b](OO who would have thought)[/b] 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 [b]implementation-defined[/b].[/size] [size="2"]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.[/size] [size="2"]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).[/size][size="2"][/quote][/size] [size="2"]C++ 2003[/size][size="2"][quote][/size] [size="2"]16.2 Source file inclusion [cpp.include][/size] [size="2"]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[/size] [size="2"]# include <h-char-sequence> new-line[/size] [size="2"]searches a sequence of [b]implementation-defined[/b] 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 [b]implementation-defined[/b].[/size] [size="2"]3 A preprocessing directive of the form # include "q-char-sequence" new-line[/size] [size="2"]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 [b]implementation-defined[/b] manner. If this search is not supported, or if the search fails, the directive is reprocessed as if it read[/size] [size="2"]# include <h-char-sequence> new-line with the identical contained sequence (including > characters, if any) from the original directive.[/size] [size="2"]4 A preprocessing directive of the form # include pp-tokens new-line[/size] [size="2"](that does not match one of the two previous forms) is permitted[b](And again OOOO)[/b]. 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.[/size] [size="2"]#if ’z’ - ’a’ == 25 if (’z’ - ’a’ == 25)[/size] [size="2"]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.[/size] [size="2"]309[/size] [size="2"]ISO/IEC 14882:2003(E) ? ISO/IEC 16.2 Source file inclusion 16 Preprocessing directives[/size] [size="2"]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.[/size] [size="2"]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.[/size] [size="2"]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.[/size] [size="2"]7 [Example: The most common uses of #include preprocessing directives are as in the following: #include <stdio.h>[/size] [size="2"]#include "myprog.h"[/size] [size="2"]—end example][/size] [size="2"][/quote][/size] [size="2"] [/size][/color] [color="#1c2837"][size="2"]And finally[/size][/color] [color="#1c2837"][size="2"][quote][/size][/color][color=#1C2837][size=2]Bye![/quote][/size][/color] [color=#1C2837][size=2][b]Correct[/b][/size][/color]
  2. 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. Header Files

    OK this thread confuses me somewhat. Factually incorrect information gets voted up and factually correct information which asks the [b]lazy[/b] 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! [quote] [color="#1C2837"][size="2"]Why don't we just close every pure C++ thread - since the correct answers are all in the standard. [/quote][/size][/color] [color="#1C2837"][size="2"]That sounds like an excellent idea but what in the OP's post says it is C++?[/size][/color]
  4. Header Files

    [quote name='Antheus' timestamp='1306410974' post='4816004'] Do you own a copy of C++ standard? Not draft, the actual copy. [/quote] 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. [quote] [quote name='magic_man' timestamp='1306409653' post='4815994'] Please look in the standard! [/quote] 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 [quote][color=#1C2837][size=2]The standard is no place for an inexperienced programmer. [/quote][/size][/color] [color=#1C2837][size=2]I consider this wrong but if the user had posted in "For Beginners" then maybe I would have answered differently [/size][/color]
  5. Header Files

    [quote name='rip-off' timestamp='1306409827' post='4815995'] Short story: The angle bracket version is for external header files, the quotation marks are for your own header files. See [url="http://msdn.microsoft.com/en-us/library/36k2cdd4(v=vs.80).aspx"]here[/url] for a full explanation. [quote] Please look in the standard! [/quote] 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. Header Files

    Please look in the standard! If you have a question after that then please post it.
  7. [quote][color="#1C2837"][size="2"]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][/size][/color] [size="2"][color="#1c2837"]Fumbling in the dark is another way to look at this. What ever happened to craftsmanship ?[/color][/size]
  8. Site mobile interface

    [quote name='Michael Tanczos' timestamp='1305941908' post='4813717'] [quote name='magic_man' timestamp='1305908378' post='4813516'] 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. [/quote] 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 [quote][color=#1C2837][size=2] O no problem you can use the alternative upload method, well that does not seem to work either.[/quote][/size][/color]
  9. 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. 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"][size="2"]14575 but this has gone beyond the point of a joke and is now complete and utter incompetence! It is the front page FFS.[/size][/color][/font]
  11. 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. Osama Bin Laden is Dead.

    [quote name='trzy' timestamp='1304799626' post='4807787'] the overbearing presence of the United States acting as world police We call the shots because might makes right.[/quote] 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. Which license to use?

    [quote name='MartinsM' timestamp='1304435552' post='4805974'] just don't give anybody source code. [/quote] Not so fast Suyash how are you linking to SDL, DevIL and Audiere? Have you made any changes to those libraries?
  14. [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? [code] #ifdef __cplusplus #include <cstdlib> #else #include <stdlib.h> #endif [/code]
  • Advertisement