|
||||||
| C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Frantic, if youve never heard of it, then just stick to standard c++
Code:
#include <fstream>
void main( void )
{
ifstream fin("myfile.ini" , ios::in );
ofstream fout;
if( fin.fail() ) //File error
{
//So create the file
fout.open("myfile.ini" , ios::out | ios::trunc );
//File it with the default text/binary
fout << "Whateveryouwantasdefault";
//Close and clear the file write buffer
fout.close();
fout.clear();
//And reopen the file
fin.open("myfile.ini" , ios::in );
}
//Now do your normal operations as if nothing ever happend
fin.read((char *)&bla , sizeof(blastruct));
fin.close();
}
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall |
| Sponsored Links |
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Project: ionFiles - Joomla Simple File Download | Jordan | Community Projects | 302 | 08-30-2008 04:49 PM |
| Windows XP Tricks & Tips!!!!..new ones. | pranky | Tutorials | 9 | 08-23-2008 03:22 PM |
| Check if a file exists? | Lop | Pascal/Delphi | 3 | 01-07-2007 12:54 AM |
| Check if a File Exists | NeedHelp | C# Programming | 4 | 08-07-2006 05:20 PM |
| Check if a URL Exists | Chan | PHP Forum | 1 | 07-13-2006 12:54 PM |
| John | ........ | 223.00000 |
| dargueta | ........ | 168.00000 |
| Xav | ........ | 164.00000 |
| LogicKills | ........ | 20.00000 |
| gaylo565 | ........ | 18.00000 |
| WingedPanther | ........ | 15.00000 |
| |pH| | ........ | 15.00000 |
| Johnnyboy | ........ | 3.00000 |
| navghost | ........ | 1.00000 |
Goal: 100,000 Posts
Complete: 67%