|
Doxygen will do something like that although it's probably not what you want.
I wrote a little app years ago to generate makefile depenedencies that you could probably hack to do what you want. Email if you want a copy.
he he he. I like it in the kitchen! - Marc Clifton (on taking the heat when being flamed)
Awasu v0.4a[^]: A free RSS reader with support for Code Project.
|
|
|
|
|
I encounter a warning, when i debug a programe.
The warning message is "User breakpoint called from code at 0x77f97704".I donot know the reason.
When this warning message appears, VC shows a screen of assembly code to me.Please tell me the reason to cause this warning .
I love sea
|
|
|
|
|
Is VC stopped at a line that says "int 3"?
You've probably hit an assertion somewhere i.e. done something wrong. Bring up the call stack (ALT-7) and have a look at what was going on at the time. If you press F11 a few times, you might be able to switch back to your original source code as well.
he he he. I like it in the kitchen! - Marc Clifton (on taking the heat when being flamed)
Awasu v0.4a[^]: A free RSS reader with support for Code Project.
|
|
|
|
|
Yes you are right. But i donot know what the assembly codes mean.Have you ever encourted this problem?How can i solve this problem.
I love sea
|
|
|
|
|
You don't need to understand the assembly.
INT 3 is how Visual C++ stops the program if an assertion failure happens. If you don't know what that means, look up what the assert() macro does.
What has happened is that some code somewhere has noticed that something has gone wrong and stopped the program for you, where it happened, so that you can do something about it. For example, if you call strlen() like this:
char* p = NULL ;<br />
size_t n = strlen(p) ;
strlen() might be smart enough to detect that you passed in a NULL pointer and assert.
So bring up the call stack as I suggested and you can see exactly where your program was when it stopped. And pressing F11 a few times *might* get out of the assembly code and back to some C source code.
he he he. I like it in the kitchen! - Marc Clifton (on taking the heat when being flamed)
Awasu v0.4a[^]: A free RSS reader with support for Code Project.
|
|
|
|
|
Hi.
How do you read, write, and append data to files using Win32 CreateFile? In core C++, we can use write(). CreateFile returns a handle to a file. I thought about mapping the file and then casting the void * that MapViewOfFile() returns to BYTE *, but that seems overkill since all the process does is write to a file.
Thanks,
Kuphryn
|
|
|
|
|
Why do you need to use CreateFile instead of iostreams ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
One reason is access permission such as share.
Kuphryn
|
|
|
|
|
You don't do any of that with CreateFile() itself, that API only opens/creates the file. ReadFile() and WriteFile() to read and write. To append, call SetFilePointer() to move the pointer to the end, then write.
--Mike--
Friday's GoogleFight results: Britney Spears 2,190,000 - Erica Weichers 23
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
|
I have an SDI Application with a splitter as follows
------------------------------------------------------------------
Property Sheet containing a few tabs
------------------------------------------------------------------
Log View
------------------------------------------------------------------
Most of the application activities happen in the upper pane where i have a property sheet containing few tabs that have bunch of controls
All the data is contained in the document class. Every activity is logged in the lower pane which contains a CListView
In the document template i have attached the document with the view used in the upper pane.
I created the panes in CMainFrame as follows.
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
BOOL flag;
if (!Splitter.CreateStatic(this,2,1))
return FALSE;
flag=Splitter.CreateView(0, 0,pContext->m_pNewViewClass,CSize u(90,90), pContext);
if(!flag)
return FALSE;
pContext->m_pNewViewClass= RUNTIME_CLASS(CLoggingView);
flag=Splitter.CreateView(1,0,pContext->m_pNewViewClass,CSize s(10,10),pContext);
return flag;
}
Now i basically need a pointer to the lower pane Log View in my document as document as all the data which is required while logging. The way i am doing it is basically since i know that this is the second view, i am iterating through the two views and getting the keeping the second view as pointer to log view, as shown below. Have feeling this is not the best way of doing this.
bool anotherfFlag = true;
POSITION posi = GetFirstViewPosition();
while (pos != NULL)
{
CView* pView = GetNextView(posi);
if (!anotherfFlag )
m_PointerToLogView = (CLoggingView*)pView;
anotherfFlag = false;
}
Could you please suggest some better way of doing this?
|
|
|
|
|
My question is the program I am working on was developed awhile ago and it will only execute on a machine the has Visual Studio on it. But I have taken the proper steps so that this should not happen. Yet it still does.
Please help.
Matt
|
|
|
|
|
My guess is that you are attempting to distribute a debug version of your application. The debug version is usually dependent on some VS specific libraries, which only are on a machine which VS is installed. That's my first guess.
|
|
|
|
|
Anonymous wrote:
But I have taken the proper steps so that this should not happen. Yet it still does.
I'm not sure how we can help you. If you've 'taken the proper steps' then it will work. Presumably this is not the case, so you should list the steps you've taken, so we can fill the gaps. How does it fail ? What have you done to make it work ? Does it use the C runtime ? MFC ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
If your program uses MFC check to see if you linked MFC statically or if you linked to use the shared DLL. If you linked to use the shared DLL then you need to have those DLL's in the path.
Another thing to look at...Did you use any ActiveX controls, if so, then you need to have those accessible
Gary Kirkham
A working Program is one that has only unobserved bugs
|
|
|
|
|
|
When I use TextOut() to display a string, the string is displayed horizontally. So I create a font with lfEscapement & lfOrientation = 900. And select it to the CDC object. I think the string should be displayed vertically. Unfortunately, it isn't displayed vertically.
How can I do that?
Thanks in advance.
Vincent
|
|
|
|
|
Did you check the return value from CreateFont? There may be some other problem...show us some code
Gary Kirkham
A working Program is one that has only unobserved bugs
|
|
|
|
|
1. Make sure it's a TrueType font.
2. If it still doesn't work, please post some code.
Regards,
Alvaro
Well done is better than well said. -- Benjamin Franklin
(I actually prefer medium-well.)
|
|
|
|
|
Dear Alvaro,
Thank you very much. After I added "lf.lfOutPrecision = OUT_TT_ONLY_PRECIS;", it worked.
Thanks again
Vincent
|
|
|
|
|
For some reason when i try to delete a node and print out the remaining list its prints a bunch of numbers i dont need
The list after deleting 92:
6685124 82 62 72 99
The list after deleting 72:
6685124 82 62 7801996 99
i need it to display like this
The list after deleting 92:
82 62 72 99
The list after deleting 72:
82 62 99
u can see what i need to get rid of.
heres is some code that i think could be the problem, and by the way this list is circular! if this isent enough code please say so
void ClosedList::Delete(int item)
{
NodeType* delPtr;
NodeType* currPtr;
if (item == head->component)
{
delPtr = head;
head = head->link;
}
else
{
currPtr = head;
while (currPtr->link->component != item)
{
currPtr = currPtr->link;
}
delPtr = currPtr->link;
currPtr->link = currPtr->link->link;
}
delete delPtr;
}
here is my print function
void ClosedList::Print() const
{
NodeType* currPtr = head->backlink;
if(!IsEmpty())
{
do
{
cout << currPtr->component << " ";
currPtr = currPtr->backlink;
}while (currPtr!= head);
cout << currPtr->component << " ";
}
cout <<endl;
bool ClosedList::IsEmpty() const
{
return (head == NULL);
}
|
|
|
|
|
I just ripped this out of an old assignment, you might try something like this as I know it works. Keep in mind this is only for a singly linked-list.
int records::DeleteNode(double num)
{
ListNode *NodePtr, *PreviousNode, *BufPtr;
bool bIsFound;
BufPtr = head;
while(BufPtr != NULL)
{
if(BufPtr->ssan == num)
{
bIsFound = true;
}
else
{
bIsFound = false;
}
BufPtr = BufPtr->Next;
if(bIsFound == true)
BufPtr = NULL;
}
if(bIsFound == false)
return -1;
if(!head)
return -1;
if(head->ssan == num)
{
NodePtr = head->next;
delete head;
head = NodePtr;
}
else
{
NodePtr = head;
while(NodePtr != NULL && NodePtr->ssan != num)
{
PreviousNode = NodePtr;
NodePtr = NodePtr->next;
}
PreviousNode->next = NodePtr->next;
delete NodePtr;
}
return 0;
}
Nick Parker
Not everything that can be counted counts, and not everything that counts can be counted. - Albert Einstein
|
|
|
|
|
Actually this is a two part question.
My first question is to anyone who has used the MSFlexGrid control in their software. In my MDI the resource file is huge. And I believe it is because of the flexgrid. Because this file is so huge it takes a long time to recompile the program. I am asking is there a way to reduce this time.
My second question is the program I am working on was developed awhile ago and it will only execute on a machine the has Visual Studio on it. But I have taken the proper steps so that this should not happen. Yet it still does.
Please help.
Matt
|
|
|
|
|
Hi All,
I'm looking for an all-inclusive article or series of articles or a reference book of somesort on iostream and its uses, along with throughough documentation on cout and cin. I need to at least start using these but I really don't know how and am having a hard time finding information about it. Thought this is a good place to ask.
any comments or suggestions is greatly appreciated.
Thank you.
|
|
|
|
|
groover4life wrote:
I'm looking for an all-inclusive article or series of articles or a reference book of somesort on iostream and its uses
This[^] is an excellent reference.
Nick Parker
Not everything that can be counted counts, and not everything that counts can be counted. - Albert Einstein
|
|
|
|