•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 375,227 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,262 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser:
Views: 418 | Replies: 4 | Solved
•
•
Join Date: Feb 2008
Posts: 433
Reputation:
Rep Power: 1
Solved Threads: 1
I am trying to check the size of a file with this code.
The file is named "OneFile.txt" and is of the size 230 kb.
The MessageBox will show the number 37. If I change the file so it will be 460 kb instead, still the messageBox will show the number 37.
I am not sure if I have missed something here ? I beleive I am not checking the size of the file below.
I think I checking the string ?
The file is named "OneFile.txt" and is of the size 230 kb.
The MessageBox will show the number 37. If I change the file so it will be 460 kb instead, still the messageBox will show the number 37.
I am not sure if I have missed something here ? I beleive I am not checking the size of the file below.
I think I checking the string ?
std::string path = ""; path = "C:\\Folder1\\Folder2\\OneFile.txt"; double filesize = path.size(); stringstream Getsize; std::string Getsize2; Getsize << filesize; Getsize2 = Getsize.str(); String^ sizeee = gcnew String(Getsize2.c_str()); MessageBox::Show(sizeee);
Last edited by Jennifer84 : May 9th, 2008 at 5:56 pm.
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb C++ Marketplace
Similar Threads
- Programming in VBA reading file into dynamic array (VB.NET)
- Checking size of file/folders (Linux Users Lounge)
- plz help me in solving this files concept question (Java)
- {Urgent} need help with file compression and decompression (C++)
- Play a .wav file (Java)
- C++ File Generator (C++)
- How to find End of file (C++)
- inserting a size (PHP)
- C++ reading,writing,displaying a file? (C++)
Other Threads in the C++ Forum
- Previous Thread: Cn't figure out error
- Next Thread: C++ Bubble sort not working with array of records, does work with simple array.



Threaded Mode