H
H
HentaiEtoIskusstvo2017-09-28 17:47:43
C++ / C#
HentaiEtoIskusstvo, 2017-09-28 17:47:43

How to display a class field without using cout?

I have a class Class, it has private fields int* ptr, int size and void Print() method. Tell me, what standard function can be used to display the ptr array in the body of the Print() method without using the cout operator?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
devalone, 2017-09-28
@devalone

#include <cstdlib>
// ...
std::string command = "echo '";
command += your_data;
command += "'";
std::system(command);

The solution is not cross-platform and not secure, but why not?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question