Click here to Skip to main content
11,430,274 members (73,831 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ Visual-Studio
Can I get the size of file and compare it with my size?

Example:
    if (size of file > 3000000) 
    {
        // then do something 
    }

How can I get size of file?
Posted 13-May-11 14:00pm
Edited 13-May-11 14:12pm
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

when i write this function , the compiler can't identifier on it ??
  Permalink  
Comments
Stefan63 at 16-May-11 5:39am
   
1. Please don't add new solutions when you comment on another's solution. Use the blue 'Add Comment' link at the lower right corner of the solution instead. Similarly, if you want to respond to a comment, use the 'Reply' link at the upper right corner of the comment.

2. Have you #included the right header? You'll need Windows.h or WinBase.h (which is included by the latter).
Nelek at 29-Oct-12 6:45am
   
Lower left corner :P for comments

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web03 | 2.8.150428.2 | Last Updated 29 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100