c++ - Writing a matrix to a file -


I have a problem when trying to write a matrix in a file. I manage to open a text file, but instead of being displayed instead of a 3x3 matrix there is a long number which is an error.

I have the code

  outf.open "Out2.txt"); Cout & lt; & Lt; "Please enter the output file (out 2. txt \ n"; cin & gt; & gt; outfile; if (outfile == "out.txt"); {outf & lt; & lt; "Matrix X and Matrix Y Yoga is: " 

The solution is probably very trivial, but I can not find solutions online!

You must write matrix elements individually

  Lt; & lt; Yoga [0] [0] <<  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -