No, the code posted is all the source code between #defines, main() varia=
ble declaration and
return. I compiled it just for confirm if there could be something about =
what you say.
If I could get the iostream files from someone for which it works fine, p=
erhaps I could
compare them, (I read that a header in some compiler (mingw or borland5.5=
free) has an errata,
it can be the problem, but I don't understand, it seems nobody else has i=
t).
It happens either with #include<header.h> and with #include<header>;using=
namespace std;.
With iostream from mingw1.1 and the previous.(I have both: include/g++-3 =
=66rom one and /G++
=66rom the other)
With values of different size, small and great.
This is the whole code:
#include <iostream.h>
#include <fstream.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
double tal =3D 575756.76884;
fstream fileA, fileB;
FILE *outFile, *inFile;
char intoFile[255], outtoFile[255];
double test, recep;
char recipe, *mediate;
int size;
fileA.open("marar.txt", ios::out);
fileA << tal;
fileA.close();
fileB.open("marar.txt", ios::in);
fileB >> tal;
cout << tal;
fileB.close();
system("PAUSE");
return 0;
}
Daniel Glenfield escribi=F3:
> if you are using the same object to write multiple variables into the t=
ext
> document try destroying the object then re-creating it before you do th=
e
> next one.
>
> It's a bit like the following.
>
> e.g.
> [code]
> /**
> Object with local scope
> Notice how the strstream object is created with local scope=
. Local
> scope
> ensures the object is destroyed, then created the next time=
it
> is needed. This has the effect of making sure that no previ=
ous
> values will be carried forward to the next usage of the obj=
ect.
> */
> { // Display X Resolution
> strstream StrstreamObject;
> StrstreamObject << "XResolution: " << m_nXResolution << =
'\0';
> pListbox->AddString(StrstreamObject.str());
> StrstreamObject.rdbuf()->freeze(0);
> }
>
> { // Now for the Y resolution
> strstream StrstreamObject;
> StrstreamObject << "YResolution: " << m_nYResolution << =
'\0';
> pListbox->AddString(StrstreamObject.str());
> StrstreamObject.rdbuf()->freeze(0);
> }
>
> [/code]
>
> _________________________________________________________________
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
> _______________________________________________________________
>
> Don't miss the 2002 Sprint PCS Application Developer's Conference
> August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?s=
ource=3Dosdntextlink
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|