![]() |
|
#1
|
|||
|
|||
Check a DAT file for dataI'm using C++, Visual Net
and I'm trying to use a DAT file to save vectors The program i am writing is like a database were you can enter, view, and change the data inside the DAT file. the vector i'm using is: CPP / C++ / C Code:
what do i code so that if the file has no data it will just continue on? |
|
#2
|
|||
|
|||
Re: Check a DAT file for dataHow about a function like:
CPP / C++ / C Code:
CPP / C++ / C Code:
|
|
#3
|
|||
|
|||
Re: Check a DAT file for dataOkay so my protocol is
CPP / C++ / C Code:
and then i call it up like CPP / C++ / C Code:
the function LoadFromFile contains CPP / C++ / C Code:
why doesn't it work still? |
|
#4
|
|||
|
|||
Re: Check a DAT file for dataA couple of things...
1) your function definition for Load(....) does not match the implementation character-by-character. 2) file does not exist is not a value/function/anything. You have to reference a function that already exists. I'm not sure what that might be but check for something like bool FileExists( char* filename ). |
|
#5
|
|||
|
|||
Re: Check a DAT file for datathanks
i fixed it i used cin.peek() to see if the file has anything in it |
Recent GIDBlog
Meeting the local Iraqis by crystalattice
| 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 07:44 |
| Read a .html file, check that file for links | salemite | C Programming Language | 10 | 17-Jan-2008 07:56 |
| Download files in c for windows operating system | oozsakarya | C Programming Language | 5 | 20-Jun-2006 03:33 |
| CD burner wont burn!! | robertli55 | Computer Hardware Forum | 1 | 18-Jun-2004 10:53 |
| Yet another CD burner problem: Lite-On LSC-24082K | Erwin | Computer Hardware Forum | 1 | 22-May-2004 11:28 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The