Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

In a jam tring to use the DirectoryInfo class

$
0
0

Hi,

I'm getting back into C++ coding after a few years doing something else, and I'm trying to use the DirectoryInfo class, but I'm getting the following error:

     error c2065: 'DirectoryInfo' : undeclared identifier

Here's the simple test program I'm currently trying to use.  Why can't it see the system class definitions?  thanks for your help!

// ConsoleApplication3.cpp : Defines the entry point for the console application.

//

#include"stdafx.h"

usingnamespace System;

usingnamespace System::IO;

int_tmain(intargc,_TCHAR*argv[])

{

      DirectoryInfo* di = new DirectoryInfo(S"c:\\");

      delete(di);

      return 0;

}


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>