![]() |
|
#1
|
|||
|
|||
Input from a file, declare the path of the fileHey guys, below is a simple program that will read the first value of from the path "C:/data1.txt",and assign it as x. What I want to do is to let the user specify the path of a file ,such as declare the path as a vriable??
CPP / C++ / C Code:
Is it possible to declare a variable that include characters and symbols? THX CPP / C++ / C Code:
Last edited by admin II : 08-Feb-2007 at 17:04.
Reason: Please surround your C code with [cpp] ... [/cpp]
|
|||
|
#2
|
|||
|
|||
Re: Input from a file, declare the path of the fileHi,
The problem was with fopen.the character array path[10] contained the path of the file. The correct way would be fin = fopen(path, "r"); Regards, Rajeev Nair |
Recent GIDBlog
Toyota - 2009 May Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Airport Log program using 3D linked List : problem reading from file | batrsau | C Programming Language | 11 | 29-Feb-2008 08:44 |
| Download files in c for windows operating system | oozsakarya | C Programming Language | 5 | 20-Jun-2006 04:33 |
| fltk-2.0 cvs | Plumb | FLTK Forum | 20 | 13-Nov-2004 08:10 |
| CD burner wont burn!! | robertli55 | Computer Hardware Forum | 1 | 18-Jun-2004 11:53 |
| Yet another CD burner problem: Lite-On LSC-24082K | Erwin | Computer Hardware Forum | 1 | 22-May-2004 12:28 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The