I have a form called form1.h, and respectively form1.cpp. I have the following code:
Code: CPP
#include "stdafx.h"
#include "Form1.h"
#include <windows.h>
#include <iostream>
#include <fstream>

using namespace fyp1;

int APIENTRY _tWinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPTSTR    lpCmdLine,
                     int       nCmdShow)
{
    System::Threading::Thread::CurrentThread->ApartmentState = System::Threading::ApartmentState::STA;

    ifstream iFile("test.txt");


    Application::Run(new Form1());
    return 0;
}
I wanna add ifstream into above so that I can read-in a file, then pass the parameter into Form1(). But how can I do that? (ignore the button problem, i don't need it now)The above code cannot be compiled.
Thanks again.

Last edited by shabbir; 5May2006 at 07:23.. Reason: Code formating.