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...
...function that handles collating the info from an unknown number of keyword groups in a file.
BOOL DATACOLLECTOR::parselanguagekeywords (LANGUAGE *lng, FILE *fp)
/* This is the engine for parsing a keyword lists for a specific language.12 types of keywords are allowed per language and each...
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...
...:
// Keyword Bin :
struct KEYWORDBIN
{ INT keywordindex;
CHAR name[MAX_STR_SIZE];
BOOL iscasesensitive;
COLOUR colour;
CHAR *keywords[];
};
In my main parse fnt I do :
KEYWORDBIN *kwd = new KEYWORDBIN;
if (getkeywords(fp,kwd->keywords) == 0)
return FALSE;
The...
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...
...Effectively you forward declare a pointer to a struct in the private declaration of your class
foo.h
-----
class X
{ private :
struct Ximpl *pimpl;
};
foo.c
-----
struct X::Ximpl
{// private members go here.
}
This has the advantage that private members are fully hidden and can be...
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...
...MAX_NO_SUBDIRS 50
#define MAX_DIRNAME_SIZE 500
char directories[MAX_NO_SUBDIRS][MAX_DIRNAME_SIZE];
..
...
....
.....
void find_directories(int *nodirs)
// Locate any subdirectories under the current directory.
// We use FindFirstFile and FindNextFile testing the dwFileAttributes flag
//...
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.