|
Check out GetDiskFreeSpaceEx()
|
|
|
|
|
Thanks for your suggestion.
But in the parameters of the function, the directory name has to be given, but here iam having only handle of the device.Will it be ok with it or any other suggestions..
Here iam not having any driver installed..
Regards
vijay
|
|
|
|
|
If there is no driver for the drive, how do you plan on accessing the drive at all?
|
|
|
|
|
Still now i am able to get the device descriptions without the help of driver and i want to proceed further. I got the handle to the device.
Can we do anything with the handle to get the solution.
Anyway the driver is going to do evrything with the help of handle only na..
Regards
vijay
|
|
|
|
|
Hi
I want to make array of objects without default constructor
#include <iostream><br />
<br />
using namespace std;<br />
<br />
class one <br />
{<br />
int t;<br />
public: <br />
one(int x):t(x) { cout << "Ctor" << endl;};<br />
<br />
};<br />
<br />
int main(void) {<br />
one* o[8];<br />
for ( int i = 0; i < 8 ; i++)<br />
{<br />
o[i] = new one(3);<br />
}<br />
delete[] o;<br />
}
I tired this. But it gives me run-time error with Vs 2005.
What is the problem?
Thanks
|
|
|
|
|
Hi,
instead of deleting the array
delete[] o; which you can't or at least shouldn't because its not allocated (hence it isn't on the heap but on the stack).
You need to delete the allocated one objects one by one
for ( int i = 0; i < 8 ; i++)
{
delete o[i];
}
codito ergo sum
|
|
|
|
|
|
sawerr wrote: one* o[8];
As told already, this is array of pointer to one . And Created on stack, so you dont need to worry about its memory.
And you need to free pointer memory for each index , which is allocated on heap.
|
|
|
|
|
Hi there
Since a sereval time i have very often strange problems with local variables.
char xxx[10] will cause an DebugHeapError by destruction ( if the function terminates )
a char *xxx = (char*)malloc(sizeof(char)*10); with a free(xxx); resolves the problem
a special DBF-Type (Date4) causes the same error.
The parameter pb from the function-calling static int __cdecl checkBytes(unsigned char * pb, ...
is unreadable (which causes the error)
Why are this kind of errors produces ( and why not since the begeinning of the project )
Big thanks
-- modified at 6:08 Monday 5th March, 2007
i debug the function which causes the error, now i see that the Date4 Pointer ( i changed the locale Date4 into a Date4*) will be overwritten with data at the initialisation of a char sss[10];
Why does the memory will be overwritten?
|
|
|
|
|
baerten wrote: Why does the memory will be overwritten?
Because you are probably somewhere writing out of the bounds of an array. This will also give you the heap error.
|
|
|
|
|
After checking 2500 lines of code ...
it was indeed a corrupt char-array which provokes the overflow
Thanks for your help
it's funny or more sadly, that a stupid error like this one happens at the first time of coding and
now after x years LOOOL C# with his strings makes the life too easy
|
|
|
|
|
baerten wrote: C# with his strings makes the life too easy
Just use a std::string in C++, that also make life easier
|
|
|
|
|
Yes, you need to show relevent code.
|
|
|
|
|
Hi everybody!
Is there any method to list the files of a directory in MFC?
|
|
|
|
|
http://www.codeproject.com/cpp/recursedir.asp
and
http://www.codeguru.com/forum/showthread.php?t=371635
-------------------------
Don't worry, be happy )
|
|
|
|
|
|
Hi guy's
i have example project downloaded from "code project.com", this could
be run successfully on visual studio 6 but when i try to run on visual studio
2005, it gives some more error, one of them is,
error C2923: 'std::list' : 'std::vector<hull::tlineapproximator<t>::SPoint>::const_iterator' is not a valid template type argument for parameter '_Ty'
that code snippet,
//! points container
typedef std::vector<spoint> PointContainer;
//! Key containers
typedef std::list<pointcontainer::const_iterator> KeyContainer;
the link of that one is http://www.codeproject.com/miscctrl/pgllib.asp[^]
can you help me what really going there.
thanks in advance
|
|
|
|
|
Provide more information please; show the code in question and indicate the line where the error in generated.
Steve
|
|
|
|
|
Hi
In my application ,I have a clock with a single line revolving at the rate of 1rev/sec.
But i get a flickering display every time the hand moves round the dial. what do i do to avoid the flicker?
Mine is dialog based display , the static text box is the canvass for the display.
Pls help
|
|
|
|
|
Where you have written code for this ?
Overrid WM_ERASEBKGND and simply return TRUE from it.
|
|
|
|
|
hi i am susanta. I dont know how to resize a bitmap.
I want load a bitmap by clicking a toolbar button and then want to resize it as per my requirement. I m able to load the bitmap but dont know how to resize it...
If anybody knows anything how to do it please help me..
I will be thankful to him
Susanta Ku.Muni
|
|
|
|
|
Susanta578 wrote: hi i am susanta.
Oh I see.
Please go through this[^] article. It would help you.
He is no fool who gives what he cannot keep to gain what he cannot lose.
- Jim Elliot
|
|
|
|
|
Susanta578 wrote: I dont know how to resize a bitmap
A way is you can use of StretchBlt but quality of image will low
|
|
|
|
|
Hi,
How can i find out that an PC is connected to Network or not.
The Idea that i have is to find its IP address.
If the IP is "127.0.0.1" then it's not connected to any network.
Is this idea correct.
Help me to get the wright Concept
VIBIN
"Fool's run away,where angle's fear to tread"
|
|
|
|
|
Look at the back of your computer. The network card/interface usually has 2 LEDs. One usually means "connected", the other one indicates traffic. If both LEDs are dark, you most probably have a faulty network card.
If you have at least one steady light, you should fire up a command line ("cmd.exe") and display the IP configuration ("ipconfig"). Find your LAN-connection. Look at the IP-Address:
If the IP-address is in the range of 169.254.0.1 to 169.254.255.254 and the Subnet-Mask is 255.255.0.0:
Chances are your (Windows-)computer is configured to obtain an IP-address automatically, but could not reach the DHCP-Server. You are then not in the same network as any computer with a DHCP-assigned IP.
If the IP-address matches one of the following descriptions
10.*.*.*
192.168.*.*
172.16.*.* to 172.31.*.*
you probably have received an IP-address from an DHCP-server, which usually indicates that you are connected to a network.
If you seem to be connected to a network, examine the "Standard Gateway": If this is set to an address in your network, you probably have a problem with a firewall or router blocking your network traffic. If this is set to "nothing", DHCP configuration may have failed.
If everything seems to be ok this far, try pinging a known server in your network by IP-address and by hostname. If the ping at the address is successful, but pinging the hostname fails, your network's DNS-server (if any) might be botched up.
Try issuing "release" and/or "renew" commands with IP-Config (for the correct syntax, see "ipconfig /?".
For more info, try "http://www.windowsnetworking.com[^], http://support.microsoft.com/kb/164015[^], http://www.microsoft.com/technet/network/evaluate/technol/tcpipfund/tcpipfund_ch16.mspx[^], http://support.microsoft.com/kb/172218[^] and the Online Book "TCP/IP Fundamentals"[^].
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|