can someone help me figure out what i'm doing wrong here:
everything else works fine so i'm just giving parts of the code...
here's part of my main function:

Code:
int main(int argc, char* argv[])
{        
        char *fname;
        
        ifstream file;
        fname = argv[1];     
        aStarSearch.readFile(fname);  //function in a class which needs the argument to main from the console window
....
        return 0;
}
Here's part of the code from the readFile function:

Code:
void readFile(char *openfile)
{
           ifstream fin (openfile);
           while (! fin.eof() )
           {

           }
}
The problem is that when the console window open up, i can't type anything there...if i hardcode the name of the file to be opened it works fine but in that case the console window doesn't really come into play because it doesn't expect any inputs from the user...

am i using this wrong?

Regards,

Farooq