i'd look for the info myself but i have no idea where to start at
i'm trying to do a linked list
it's still not really a linked list since i only have 1 node (or whatever you call linked list items)
thats my struct
struct m_stcCommand
{
char Cmd[255];
DWORD Len;
m_stcCommand* Next;
};
m_stcCommand* m_CmdLine;
then i init
m_CmdLine = new m_stcCommand;
m_CmdLine->Cmd[0] = NULL;
m_CmdLine->Len = 0L;
m_CmdLine->Next = NULL;
but then when i try to print it
sprintf(buffer, ">%s", m_CmdLine->Cmd );
i get an access violation
if i try to "%d" instead i get random numbers changing every frame..
and if i try the same sprintf line just after init it works fine
i tried malloc instead of new but it didnt helped.
what am i doing wrong?
it looks like im not the only one using that memory block... but maybe im just not declaring something right
also i'd like to know if theres a way to set a breakpoint on a memory address with vc6 .. and maybe some hints on how to debug such things by myself.
thanks
[Edited by - merdre on November 28, 2004 1:22:17 PM]