Thanks, iMalc I guess the mystery is solved now!
Just one more quick question, do you happen to know of any resources I could look at to further understand how this object (or objects that share a...
Type: Posts; User: 127.0.0.1
Thanks, iMalc I guess the mystery is solved now!
Just one more quick question, do you happen to know of any resources I could look at to further understand how this object (or objects that share a...
Ah, so if I understand this correctly the union could have been a structure with 2 members (a pointer and an element of _type_), but to save memory this was not done since the structure would only...
Haha, that is quite a turn of phrase there. But this code is actually from the Doom 3 BFG GPL released recently so I assume its organization has a purpose.
A link to the file:...
Why would you want to allocate a buffer of size _type_ (plus padding) if the first couple bytes were to be interpreted as a pointer?
I was reading through a C++ template whose purpose was to allocate memory blocks (_type_ is the generic type passed). It seems to me the purpose of this code would be to create a byte aligned buffer...
Well, I got warnings with code I wrote to test it and with the code you posted.
And I had read a post I found on a google search big decimal integer constant warning - C / C++. So I was unsure...
Thanks for the quick response
Sorry about that. I will make sure to fix that in future posts.
Ah okay, so the constant 255 is treated as a regular int. Are all constants in C assumed to...
I was going through and commenting c++ source code to gain a better understanding of it, when I came across this range checking code. I would like to know what the maximum call to LargeAllocate would...
Great, thanks Tater and angel for the help
Sorry if this question is simple, but I was unable to verify what this line of code does through google searching.
I am confused as to how the if statement with the bitwise AND is evaluated.
...
I made that post after the one I made on this forum.
EDIT:
And why does it matter why I would want to? Maybe I want to create a game on the quake engine and sell it on Xbox Live, or maybe I would...
I would like to post a link for anyone curious about using C with XNA to a post I made on the App Hub forums (Using plain C with XNA? - App Hub Forums)
Is it possible to port a game engine like quake 2 to the Xbox through XNA or is there an alternative to XNA for use with C/C++? I have searched the web and was unable to find a concrete answer to...
You're always helpful salem :). The source navigator is exactly what I was looking for, thanks
Are there any open source tools available to analyze c source files so that I can input a source file and get a list of inclusions, types, global variables, and functions? I was unable to find any...
Thanks for the suggestions and analysis :), this is mostly a personal project that I am doing for educational purposes so I would like to create my own that improves on the given code.
I do not use Turbo C++, but a quick google search turned this up (this quote references other steps in the link):
Turbo C++ 4.5 Instructions
Sorry if this isn't helpful
I am looking over code that implements a linked list where one of its members is a string value -- to deal with this they used a hash table to quickly find elements. Although I do understand hash...
Got it working, thanks for the advice :)
I apologize if this is a simple question, but I am having trouble including header files into my main program body. For example, I will have all of a library's prototypes in the Library.h file and...
Excellent, thanks for the clarification
Is it bad practice to assume the proper (left to right) execution of boolean expressions for simplicity?
Reliant code:
if(
!Is_Next_Match(Parser, TOKEN_WEIGHT) ...
Any pointers inside of structs start pointing to nothing. You have to allocate space for them:
fat pfat;
pfat->dir_array = (dir *)malloc(sizeof(dir));
pfat->dir_array->root_dir=0;
EDIT: If...
Awesome, I've got it working. This solution is exactly what I was looking for.
Thanks again for the help lazerlight :)
An element of a char array is a char not a string. Using a double quote denotes a string i.e " ", using a single quote denotes a character ' '.
This should fix it:
if (st[i] == ' ') // this...