A
Anil Gupte/iCinema.com
I am very new to C++ (Actually have dabbled in it before but nevermind).
This is my first appliccation that I started from scratch. I created a
Console Application in VC 2005 and this is what I have so far:
using namespace System;
using namespace System::IO;
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
DirectoryInfo* di = new DirectoryInfo(".");
String* files[] = Directory::GetFiles(di->ToString()];
return 0;
}
When I compile I get lots of errors. Even if I comment out the String*
files line I get at least three errors. Here they are:
Error 1 error C2065: 'DirectoryInfo' : undeclared identifier
Error 2 error C2065: 'di' : undeclared identifier
Error 3 error C2061: syntax error : identifier 'DirectoryInfo'
Error 4 error C2065: 'String' : undeclared identifier
Error 5 error C2065: 'files' : undeclared identifier
Error 6 error C2059: syntax error : ']'
Error 7 error C2653: 'Directory' : is not a class or namespace name
Any help appreciated. Thanx in advance.
This is my first appliccation that I started from scratch. I created a
Console Application in VC 2005 and this is what I have so far:
using namespace System;
using namespace System::IO;
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
DirectoryInfo* di = new DirectoryInfo(".");
String* files[] = Directory::GetFiles(di->ToString()];
return 0;
}
When I compile I get lots of errors. Even if I comment out the String*
files line I get at least three errors. Here they are:
Error 1 error C2065: 'DirectoryInfo' : undeclared identifier
Error 2 error C2065: 'di' : undeclared identifier
Error 3 error C2061: syntax error : identifier 'DirectoryInfo'
Error 4 error C2065: 'String' : undeclared identifier
Error 5 error C2065: 'files' : undeclared identifier
Error 6 error C2059: syntax error : ']'
Error 7 error C2653: 'Directory' : is not a class or namespace name
Any help appreciated. Thanx in advance.