Thankyou very much ArkM - that explains where I've gone wrong.
I think, as you say, some rethinking architecturally is required but I understand the problem now.
Appreciate the help.
Further to my last post this all works if I change the dynamic array in keywordbin to be static
e.g
CHAR keywords[MAX_NUM_KEYWORDS_PER_GROUP][MAX_KWD_LENGTH];
I can sort of see that there might be problems creating objects where the compiler cant tell the size of the object (as with the...
Hi all,
I'm writing a language file parsing utility and have a hit a brick wall using the new operator.
I have a struct for keywords as follows :
struct KEYWORDBIN
{ INT keywordindex;
CHAR name[MAX_STR_SIZE];
BOOL iscasesensitive;
COLOUR colour...
Fair enough - I thought it made things clearer personally.
I typedef all my standard types into caps - again because for me it makes things more transparent (personal preference). The code is a snippet which I copy and pasted.
If it makes a difference I have exactly the same problem if I strip...
I'm writing a data parsing utility and am coming unstuck (spectacularly) when I try to parse a keyword set.
I have a struct as follows for a keyword group :
// Keyword Bin :
struct KEYWORDBIN
{ INT keywordindex;
CHAR name[MAX_STR_SIZE];
BOOL iscasesensitive;
COLOUR colour...
DOS Time Bits :
0–4 :- Second divided by 2
5–10 :- Minute (0–59)
11–15 :- Hour (0–23 on a 24-hour clock)
Alternatively the function 'DosDateTimeToFileTime' will get you a windows FileTime.
'FileTimeToSystemTime' will then you 'normal' time formats.
Can't really say a lot without a sample of your code.
The example below is one way to do this sort of thing :
static CCHAR source_ext[5] = "*.cpp";
WIN32_FIND_DATA wfd;
HANDLE fhdl;
fhdl = FindFirstFile(source_ext, &wfd);
if (fhdl != INVALID_HANDLE_VALUE)
{ do
{
blah...
First create a DLL with an exported function that is used as the hooking function.
__declspec(dllexport) LRESULT CALLBACK HookFunction(int code,WPARAM wParam,LPARAM lParam)
{ blah blah....
}
Secondly install the system-wide hook. To install the hook, the DLL must be loaded, the hook...
Thanks a lot guys :-)
From this I can get the distance along the tangent line to place the bezier handle.
What I'm unsure about is how best to calculate the co-ordinate points of the handle.
I have two lines (chord and tangent), know the length of both lines, the angle between them and two of...
I'm not entirely sure what you are asking - the dependancy is reduced as the header file 'b.h' doesn't need to know about the header file 'a.h'.
You might also be able to extend this by replacing #include <iostream> with #include <iosfwd> if a forward declaration of the stream will suffice...
To narrow down the problem :
I have a circle in which I know the endpoints of a chord in the circle and the angle between the tangent to an endpoint and the chord.
I require the radius of the circle.
thx.
I am provided with two endpoints and the tangent to an endpoint (or both endpoints as the curve must be uniform). I need to draw a uniform curve (section of a perfect circle)from one endpoint to the other as a 4 node bezier curve (two anchors being the two endpoints and two handles determining...
Any of the following would do.
\"
"" - Not ANSII compliant but widely supported.
%c
printf ("Hello \"World\"\n");
printf("Hello ""World\"\n");
printf("%c%s%c\n",'"',"Hello World",'"');
This should really work by having the struct declared within a class and you should be able to create an instance of the class (thereby providing you with an offset pointer which you can use to address the struct).
If this is not the case (i.e. the struct is declared loose) and the struct is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.