Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

C++ std::ofstream class members

// classA.cpp
#include classA.h
A::A(void) : _logfile(0) {
    std::ofstream output("logfile.txt",std::ofstream::app);
    _logfile = &output;
}

A::dosomething(void) {
    *_logfile << "Print something" << std::endl;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #class #members
ADD COMMENT
Topic
Name
7+6 =