Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F78992102
output_formats.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Aug 24, 04:17
Size
418 B
Mime Type
text/x-c
Expires
Mon, Aug 26, 04:17 (2 d)
Engine
blob
Format
Raw Data
Handle
20132401
Attached To
R9360 PCSC_git
output_formats.cpp
View Options
#include <fstream>
#include <iostream>
int
main
(
int
argc
,
char
*
argv
[])
{
std
::
ofstream
write_file
(
"OutputFormatted.dat"
);
// Write numbers as +x.<13digits>e+00 (width 20)
write_file
.
setf
(
std
::
ios
::
scientific
);
write_file
.
setf
(
std
::
ios
::
showpos
);
write_file
.
precision
(
13
);
double
x
=
3.4
,
y
=
0.0000855
,
z
=
984.424
;
write_file
<<
x
<<
" "
<<
y
<<
" "
<<
z
<<
"
\n
"
;
write_file
.
close
();
return
0
;
}
Event Timeline
Log In to Comment