I got a problem with my project with FILE open in my project so I have created a sample project in Visual studio 2005 which is a Visual C++ CLR Console Application and write this pretty simple code and test the file handilng but it's not working and give me couple of compilation error.

#include "stdafx.h"

using namespace System;

int main(array<System::String ^> ^args)
{
Console::WriteLine(L"Hello World");
FILE* test = fopen("C:\\test.txt","rt");
return 0;
}

Errors

Error 1 error C2065: 'FILE' : undeclared identifier
Error 2 error C2065: 'test' : undeclared identifier
Error 3 error C3861: 'fopen': identifier not found

Can anybody help me to figure this out and it will probably help me to figure out my project issue too.

Lahiru