|
#include "debug.h"
using namespace GE_;
class myobject
{
private:
dbg::trackobj<myobject> trk;
};
void function(int n)
{
dbg::trace trc("function", function);
trc << "hallo with n = " << n << std::endl;
if(n) function(n-1);
else
{
trc << "creating a static object" << std::endl;
static myobject m3;
}
}
int main()
{
dbg::trace trc("main",main);
function(3);
trc << "creating two objects on stack" << std::endl;
myobject m1, m2;
trc << "Bye" << std::endl;
return 0;
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Born and living in Milan (Italy), I'm an engineer in electronics actually working in the ICT department of an important oil/gas & energy company as responsible for planning and engineering of ICT infrastructures.
Interested in programming since the '70s, today I still define architectures for the ICT, deploying dedicated specific client application for engineering purposes, working with C++, MFC, STL, and recently also C# and D.