|
Hi Nemanja,
Yes, I aggree with you! I used this (Visual Leak Detector) before, and it works just well. However, my boss prefer a memproof like application. Em....
Anyway, appreciate you help !
Best regards,
Chris.
|
|
|
|
|
You can use the UMDH.exe tool which come with the "Debugging Tools For Windows" package.
Steve
|
|
|
|
|
Hi Steve,
Thanks! I downloaded debug-tools-for-windows (dbg_x86_6.6.03.5.exe) from ms$. Emm... umdh.exe looks like a very powerful tool. I don't really make too much sense of it yet. ..... still need sometime to learn.
Thank you!
Best regards,
Chris
|
|
|
|
|
|
Hi Joe,
Thank you! I have downloaded a trial and using it at the moment. It seems like put a lot stuff in the compiled code. Em... haven't make too much sense yet. trying... trying... trying...
Best regards,
Chris
|
|
|
|
|
hi!
I want to create a clistctrl with corresponding button (like there's a button on the right side of 2nd column and 4th column) for each row.
Please help how to do this.
Thanks!
|
|
|
|
|
Well, I have no experences about this at all. I just think that if I was assigned this task, I probably just draw a bitmap (looks like a button) as item background and handle single click event of this list. Em... I don't think this is a good idea at all. Have you searched list control on codeproject website? Some list controls are really cool!
Best regards,
Chris
|
|
|
|
|
This[^] will help...
Nibu thomas
Software Developer
|
|
|
|
|
|
thanks for your suggestions. but i already saw it. I just want the button part and i cant get it right when im trying to remove some other stuff that i dont really need... please help
|
|
|
|
|
Dear all,
I am going to write an application that can retrive realtime weather information from internet.
I have no idea about how to do it.
Could you please give me some suggestions / hints?\
Best regards,
Christopher
|
|
|
|
|
I'm testing my parallel port with the Borland C 5.5 compiler:
.....
.....
.....
while(!kbhit())
{
int data;
data=(inp32)(PORT+1);
gotoxy(3,10);
printf("Data available in status register: %3d (Decimal), %3X (hex)\n", data, data);
printf("\n Pin 15: %d",(data & 0x08)/0x08);
printf("\n Pin 13: %d",(data & 0x10)/0x10);
printf("\n Pin 12: %d",(data & 0x20)/0x20);
printf("\n Pin 11: %d",(data & 0x80)/0x80);
printf("\n Pin 10: %d",(data & 0x40)/0x40);
delay(10);
}
When I compile the program, it gives the following error:
Error: Unresolved external '_delay' reference from location
Why I getting this error?
What is the use of delay(10) and gotoxy(3,10) in the program? Please advice.
Thank You
|
|
|
|
|
It's been a while since I used Borland (this is a Visual C++ / MFC board . . . )
But from the name, Delay(X) will delay X milliseconds then return.
And gotoxy(x,y) will put the cursor at (x,y) on the screen. Looking at the values, x and y are in character coordinates, so gotoxy(3,10) probably puts the cursor position at the 10th (or 11th) character in the 3rd (or 4th) line.
|
|
|
|
|
The problem is I can't access the Delay() functionn using the new Borland 5.5 C compiler. Why?
|
|
|
|
|
kbhit() and delay() are DOS (16-bit real mode) functions that are only exist in the libraries for the old Borland C++ (not Borland C++Builder) compilers. That free compiler you're using is the same compiler used in certain versions of C++Builder, so it only builds Win32 programs, not 16-bit real-mode programs.
If you really want the use the free Borland compiler, you'll have to write a Win32 Console-Mode program (I don't know how you would specify that mode with the free compiler). You would use the Win32 function Sleep() in place of delay() , and you'd need to access the parallel port's I/O ports using a DLL to allow 32-bit protected-mode access. The most common one seems to be inpout.dll from http://www.logix4u.net/[^]
|
|
|
|
|
Whew - thanks for answering that one. I'd forgotten about sleep() , so I would have had to do some searching!
|
|
|
|
|
i have a character buffer.
char buffer[]="VisualC++";
then i want to split a space between them it goes to
char buffer[]="Visual C++"
, how i can do that??
HelpMe
|
|
|
|
|
C and as far as I know C++ do not have "insert into string" functions. You have to write this sort of thing yourself. The steps below may guide you.
Create a character newBuffer[20] (bigger than your original buffer)
Copy 5 characters from buffer[0] to newBuffer[0] (the memcpy() function may be suitable.)
Put a space in newBuffer[6]
Copy 3 characters from buffer[6] to newBuffer[7]
Write a null terminator in newBuffer[10]
You now have the updated string in newBuffer.
If you want it in variable buffer, you have a problem, because the compiler will not have allocated enough space for it. Since you created it by char buffer[]="VisualC++" , the compiler will allocate 10 bytes for variable buffer - 9 characters plus terminating zero. As a result, buffer does not have room for 10 characters plus terminating zero.
|
|
|
|
|
Hello everyone!
Alright... I'm following the instructions from this site:
http://gpwiki.org/index.php/SDL:Tutorials:Practical_Keyboard_Input[^]
Here's my code:
render();<br />
<br />
SDL_Event event;<br />
while (SDL_PollEvent(&event))<br />
{<br />
switch (event.type)<br />
{<br />
case SDL_KEYDOWN:<br />
switch (event.key.keysym.sym)<br />
{<br />
case SDLK_UP:<br />
yVel = -CSIZE;<br />
break;<br />
case SDLK_DOWN:<br />
yVel = CSIZE;<br />
break;<br />
case SDLK_LEFT:<br />
xVel = -CSIZE;<br />
break;<br />
case SDLK_RIGHT:<br />
xVel = CSIZE;<br />
break;<br />
}<br />
break;<br />
case SDL_KEYUP:<br />
switch (event.key.keysym.sym)<br />
{<br />
case (SDLK_ESCAPE):<br />
case SDL_QUIT:<br />
return 0;<br />
break;<br />
case (SDLK_UP):<br />
yVel = 0;<br />
break;<br />
case (SDLK_DOWN):<br />
yVel = 0;<br />
break;<br />
case (SDLK_LEFT):<br />
xVel = 0;<br />
break;<br />
case (SDLK_RIGHT):<br />
xVel = 0;<br />
break;<br />
}<br />
break;<br />
}<br />
<br />
int temp_x = xPos + xVel;<br />
int temp_y = yPos + yVel;<br />
<br />
if ((temp_x > -1) && (temp_x < WIDTH)) xPos += xVel;<br />
if ((temp_y > -1) && (temp_y < HEIGHT)) yPos += yVel;
I can't find the problem! The dude only moves 1 spot even if I keep the arrow pressed... Anyone know? Thanks!
BTW: I'm on Linux!
Lord Kixdemp
www.SulfurMidis.com
www.SulfurSoft.tk
[ftp://][http://][hotline://]tsfc.ath.cx
-- modified at 19:25 Wednesday 15th March, 2006
|
|
|
|
|
Hello,
I am running a simple C console application in VS.net. I want to be able to measure the run time between certain lines of code, and also the time required to run the entire application, etc. Are there any tools/libraries that I can add to my program to do this? Will the debugger allow me to do some of this?
:}
Jerry
|
|
|
|
|
In the viual studio there is menu called profie. it can be used for finding the time taken by entire application, time spend in each function etc.
check http://www.codersource.net/win32_Debugging_VC.html[^]
Simply if u want to find the time taken for a single/group of statement, put OutputDebugString() before and after that statement. Then using the debug viewer u can get the time..
nave
|
|
|
|
|
Hi all,
I must say how useful I find the help offered here. Although sometimes it takes a while to get a response, the wait nullified by some mouthwatering suggestions.
Anyway let me get down to my question. I want to display the time and date (from my system clock or local clock) in a text box inside a Dialog box. Any suggestions?
Regards,
luhfluh
|
|
|
|
|
|
|
COleDateTime t = COleDateTime::GetCurrentTime();
CString str = t.Format(_T("%A, %B %d, %Y"));
m_edit.SetWindowText(str); For more information on format flags used in Format look here[^]
Nibu thomas
Software Developer
|
|
|
|