how to understand the details of file?

Hi everyone!
I need a help. I want to write a program that it is like a command and prompt (cmd)in windows. In one part I need to understand the details of the files and folders I have in a special place,like date that they are created or the size of the file and folders.
For example I need something like this:
4096 , Feb 15 2006 , c programming , directory
or
3192 , June 12 2006, file2 , file
the first number is size. The next part is creation date. The next one is the name of file or folder and the last one is type (file or folder).
can anyone help me?
Thanks for your help but I'm not allowed to use windows.h . can I do it without that?
and I'm sorry I didn't understand them very well. can you explain me a little?
Are you writing a Windows application?

Why is the use of Windows.h restricted?
@kbw - I think he has to write a program to run in the terminal; maybe they've not covered how to write GUI programs yet, probably not even using Visual Studio.
@ajh32: you need neither GUI nor Visual Studio to use the WinAPI.
@kbw :this is my homework and I'm not allowed to use windows.h.
@ajh32: You are right. I want to write a program to simulate the terminal of a operating system. but I use Visual Studio.
Any way, does any body have any suggestion or idea for me?
I really need it.
Are you really sure you're not allowed to use windows.h? I think you're not allowed to write a Windows GUI app'. Just that windows.h has a lot of code that you will need to access the filesystem etc. Please clarify.
If you want to use the Windows API, you pretty much have to use Windows.h. In the real world, you either use that, or use a library (such as Boost) that encapsulates it.

The old DOS API is still available in io.h. There's _findfirst, _findnext, ...

Also, stat is available on Windows in stat.h

But to resort to that because some lecturer arbitrarily states you shouldn't use the public interface is crazy.
Last edited on
Topic archived. No new replies allowed.