Sara Wilson
asked on
Reading binary file size and copying it to a different folder
I am creating an executable C++ program that will automatically read the size of a file and if it stops changing, it will copy and move that file to a different folder. I am relatively new at programming so am not sure how to pursue this program. The file is a binary (.hst) file. Thank you in advance.
Also I am using Microsoft Visual Studio 2010 and with it I am using C++ Win32 console development platform.
Also I am using Microsoft Visual Studio 2010 and with it I am using C++ Win32 console development platform.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you can, I suggest to upgrade to the last version of Visual Studio, since it support some very nice features that will help your developments a lot, such as filesystem library, chrono library, smart pointers (unique_ptr, shared_ptr), ownership and move semantic ect ect ...
Alternatively, you can install the boost Library via NuGet (the package manager Embedded within VS) wich will provide the libraries / class mentionned above.
Alternatively, you can install the boost Library via NuGet (the package manager Embedded within VS) wich will provide the libraries / class mentionned above.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
@Bill,
The link you posted doesn't look like ISO C++. Correct me if I'm wrong, but it looks to me like a non-portable Microsoft managed C++ version. In fact, the link has the words, ".NET Framework".
The book description refers to standard C++, which refers to the ISO C++ Standard.
https://www.amazon.com/One-Hour-Sams-Teach-Yourself/dp/0789757745/ref=pd_lpo_sbs_14_t_0/137-1193034-2383614?_encoding=UTF8&psc=1&refRID=YC8WQ7QK85XVDSRG5D5B
The link you posted doesn't look like ISO C++. Correct me if I'm wrong, but it looks to me like a non-portable Microsoft managed C++ version. In fact, the link has the words, ".NET Framework".
The book description refers to standard C++, which refers to the ISO C++ Standard.
https://www.amazon.com/One-Hour-Sams-Teach-Yourself/dp/0789757745/ref=pd_lpo_sbs_14_t_0/137-1193034-2383614?_encoding=UTF8&psc=1&refRID=YC8WQ7QK85XVDSRG5D5B
@Sara,
>> and if it stops changing
You better have some better requirements, since conceivably, if another program adds one byte at a time, say, once every few seconds, then your program could run for years until your diskspace runs out. If you don't have better requirements to cover this point, then you should make some reasonable assumptions.
>> and if it stops changing
You better have some better requirements, since conceivably, if another program adds one byte at a time, say, once every few seconds, then your program could run for years until your diskspace runs out. If you don't have better requirements to cover this point, then you should make some reasonable assumptions.
The book description refers to standard C++, which refers to the ISO C++ Standard.Hmm, by looking at the content, a book starting with C-style arrays, raw pointers before Standard Library, speaking about exceptions handling until very late (when it is tied to raw pointers), neglecting class semantic can't be a good one.
https://www.amazon.com/One-Hour-Sams-Teach-Yourself/dp/0789757745/ref=pd_lpo_sbs_14_t_0/137-1193034-2383614?_encoding=UTF8&psc=1&refRID=YC8WQ7QK85XVDSRG5D5B
Raw pointers (and C-style arrays who usually decay to raw pointers) have many issues (safety, validity, ownership, exceptions ect ...) that are solved by Standard Library containers and smart pointers. Better learn that first.
>> I am relatively new at programming ...
>> a book starting with C-style arrays, raw pointers before Standard Library, speaking about exceptions handling until very late (when it is tied to raw pointers), neglecting class semantic can't be a good one.
So what book do you recommend for this beginner?
>> a book starting with C-style arrays, raw pointers before Standard Library, speaking about exceptions handling until very late (when it is tied to raw pointers), neglecting class semantic can't be a good one.
So what book do you recommend for this beginner?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER