Using System.IO in a VC.NET Win32 console application

S

SheetalGandhi24

Hi

I need to use the System.IO namespace in the Win32 console
application. Any clues for doing the same?
Basically, I need to load the files of a particular folder in an
array. I need to do this in a VC++.NET Win32 console application. I am
very new to using VC++.
Can anyone please help?

Thanks in anticipation,
Silky
 
R

raylopez99

Hi

I need to use the System.IO namespace in the Win32 console
application. Any clues for doing the same?
Basically, I need to load the files of a particular folder in an
array. I need to do this in a VC++.NET Win32 console application. I am
very new to using VC++.
Can anyone please help?

Thanks in anticipation,
Silky


Sorry no help, but I am told that System.IO namespace is not a
beginner's topic, but is an advanced topic. Good luck.

RL
 
B

Bruno van Dooren [MVP VC++]

I need to use the System.IO namespace in the Win32 console
application. Any clues for doing the same?
Basically, I need to load the files of a particular folder in an
array. I need to do this in a VC++.NET Win32 console application. I am
very new to using VC++.
Can anyone please help?

Hi,
Are there specific reasons you want to use a win32 console app instead of a
CLR console app?
Because that would use the System.IO namespace automatically.

If you cannot do that
- rightclick your project
- select properties
- enable 'common language runtime' support in the config properties -
general tab
- rightclick your project
- select 'references'
- add a .NET reference to 'System'

in your cpp file add
using namespace System;
using namespace System::IO;

and then you can simply do things like
Console::WriteLine(L"test");

--

Kind regards,
Bruno van Dooren
(e-mail address removed)
Remove only "_nos_pam"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top