A
auditory
i am working with the program which generates
c language source code.
i implemented function adding indentation tabs to each line like
std::string tabcharcter(int depth)
{
string tab;
for(int i=0;i<depth;i++) tab+="\t";
return tab;
}
in some function
{
....
ostream os;
while(..)
{
os << tabcharcter(3);
os << string_line << endl;
}
....
}
is there any better way for this?
like some output manipulater, or,
automatic way to add n tabs after new line character added.
c language source code.
i implemented function adding indentation tabs to each line like
std::string tabcharcter(int depth)
{
string tab;
for(int i=0;i<depth;i++) tab+="\t";
return tab;
}
in some function
{
....
ostream os;
while(..)
{
os << tabcharcter(3);
os << string_line << endl;
}
....
}
is there any better way for this?
like some output manipulater, or,
automatic way to add n tabs after new line character added.