|
That's true. Unless you can execute something like a stat() on the file at the UNIX end, you have no way of determining that it is anything other than a regular file. You can't even tell if it's a file with multiple hard links, much less something more esoteric, like a soft link or a device file.
Steve S
|
|
|
|
|
Hello !
Juste a little question.
What is exactly the difference between delete and delete[] ?
Is the second used to delete memory allocated for more than one element and the first when only one element was allocated ?
Thanks
|
|
|
|
|
delete[] assumes that the block of memory pointed at is an array of (the same kind of) objects where the delete operator needs to call the destructor for each element in the array.
Rob Manderson
Paul Watson wrote:What sense would you most dislike loosing?
Ian Darling replied.
Telepathy
Then I'd no longer be able to find out everyones dirty little secrets The Lounge, December 4 2003
|
|
|
|
|
Both c++ commands are used to deallocate memory that was previously created. However, delete [] instructs the compiler that the given memory location is an array of allocated space (usually created using the new [] keyword).
The general rule is to use
delete with new and
delete [] with new []
I Dream of Absolute Zero
|
|
|
|
|
Ok thanks !
That was what I was thinking about but I wasn't sure
|
|
|
|
|
for more details, refer to Scott Meyers <<effective c++="">>
|
|
|
|
|
Hi, I'd like to be able to create a shortcut in the start menu like office does. Instead of putting it in the Programs > section, it puts it in the main Start Menu window?
How can I do this? Thank you,
Ashman
|
|
|
|
|
put your short cut here:
C:\Documents and Settings\All Users\Start Menu
but i don't know how to put one in the start menu for windowsxp-style start menu
|
|
|
|
|
Hi, I need to know how to copy a folder and all the contents within to another location set by the user. Because the folders content is read only, I want to be able to make ReadOnly(FALSE);
Is this possible, please help!
Thanks in advance
Ashman
|
|
|
|
|
SHFileOperation will help out, its very good api to work around with files and folder.
"When death smiles at you, only thing you can do is smile back at it" - Russel Crowe (Gladiator)
|
|
|
|
|
Thanks
I searched for SHFileOperation() API calls and I don't understand how to implement it in my program.
Do you have/know of an example that I can use. What I want to do is very basic; transfer 2 folders with all their files intact from location:
D:\Programming\NeriedPOS\nbsSetup\nPOS & D:\Programming\NeriedPOS\nbsSetup\nManager
to C:\Program Files\nPOS with ReadOnly(FALSE)
Would you kindly be able to show me how to do that using SHFileOperation() or any other API?
Please help...its kinda urgent considering I have almost run out of hair to pull
Thanks
Ashman
|
|
|
|
|
This
SHFILEOPSTRUCT shfo = {0};
shfo.wFunc = FO_COPY;
shfo.pFrom = "D:\\Programming\\NeriedPOS\\nbsSetup\\nPOS\\*.*\0";
shfo.pTo = "C:\\Program Files\\nPOS\0";
SHFileOperation(&shfo); should get you started.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Have I ever told you I love you?
Thanks heaps
|
|
|
|
|
Ashman wrote:
Thanks heaps
You're welcome stacks!
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Hello ,
Is there any SDK to implement the AUto-Upgrade feature .I am writing a application in vc++ .Is there anything ,that i can use some SDKs that can be used to check for upgrades for my application from a URL /server ?
Cause is my effort;
Effect is God's effort
|
|
|
|
|
What I did, which was kind of slow maybe to create an autoupdater was to get my program to connect to the server, navigate to updates folder and open a file which was similar to an ini file. Get the current version of the program the user is running, set a variable for each new version like; Version 1.10a = 1 and Version 1.10b = 2 etc.
On the server say the new version is Version 1.10c which = 3, try like: Note this is using CIniEx as an example...
<br />
CString strVersion;<br />
ini.Open("Version.ini");<br />
strVersion=ini.GetValue("Program","Version");<br />
<br />
if(strVersion == "3")
{<br />
}<br />
else {<br />
}<br />
<br />
Just a suggestion....bit hard to explain considering Im a complete knob. For some reason things just work themselves out for me programmatically . Hope that helped.
Ashman
|
|
|
|
|
How do you get the functions exported by the dll and the detailed description of their arguments
Thank you in advance
Samir Sood;)
Samir Sood
|
|
|
|
|
http://www.mindcracker.com/mindcracker/c_cafe/dll/dll_tut1l.asp
Please refer this .....Basically u need to inform the compiler using some macros that these functions need to be exported
Cause is my effort;
Effect is God's effort
|
|
|
|
|
SamirSood wrote:
How do you get the functions exported by the dll...
The Depends utility that ships with Visual Studio is good for this.
SamirSood wrote:
...the detailed description of their arguments
See this article.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
However, unless the functions are decorated C++ ones, Depends will not be able to provide much by way of parameter information;
Sometimes you can get a very small hint, if the exported name has @nn after it, since that tells you the size of all the parameters, but of course, you still need to be able to read the disassembly to work out a bit more by way of context
Steve S
|
|
|
|
|
Hi there...
i'm new here with vc++ n i need a little help please...
1. i need a drop down box n query the value from a database.
2. from the drop down, when the user made the selection, the system will do another query and output the result in a data grid table.
it sounds so simple but how do u actually do it with Visual C++
could somebody please help
thanks
``````````
|
|
|
|
|
To handle a change in the combobox, provide a handler for the CBN_SELCHANGE message. To get the value in the edit portion of the combobox, use GetWindowText() .
How are you communicating with the database (e.g., directly, ODBC, DAO)?
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
thanks for the reply....
i'm using odbc for the connection with an access database, and still is confuse on how to connect by the way.... could you help to explane which is the easiest way...
thanks
``````````
|
|
|
|
|
|
i think i got it on how to query and all.. but few silly question...
1. where actually do i put it in my app?
2. how do i take the result from the query and put it an a listbox.??
thanks
``````````
|
|
|
|