CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Problem with ofstream

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 9, 2020, 13:32
Default Problem with ofstream
  #1
New Member
 
Goon
Join Date: Apr 2020
Posts: 8
Rep Power: 6
qkrtjdrns is on a distinguished road
Now I am trying to save data by using ofstream as below.
Code:
    ofstream stream5("./constant/pMeasured_prev.dat");
    ofstream stream6("./constant/dispKI_prev.dat");
//    stream5 << pMeasured_ << endl;
//    stream6 << dispKI(1) << endl;
    stream5 << "   " << endl;
    stream6 << "   " << endl;
    stream5.close();
    stream6.close();
Even though I only write 4 spaces without any letters, there is 1 at the end of the spaces as below for both stream5 and 6.

Code:
   1
Can any one know about the problem related to ofstream?
qkrtjdrns is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SU2-7.0.1 on ubuntu 18.04 hyunko SU2 Installation 7 March 16, 2020 04:37
UDF compiling problem Wouter Fluent UDF and Scheme Programming 6 June 6, 2012 04:43
Gambit - meshing over airfoil wrapping (?) problem JFDC FLUENT 1 July 11, 2011 05:59
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 06:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 19:13


All times are GMT -4. The time now is 12:42.