By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,194 Members | 859 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,194 IT Pros & Developers. It's quick & easy.

Operator<< for ostream

P: n/a
Hi @ll,

I'am programming a class for big integer number. I needed one for
powers because int an long didn't fulfill my needs.

I coded some operators but now I am somehow lost. I store the digits
for my class in a valarray and I'd like to output them on cout for
example.

Is there a better way than to copy the digits to a String and return
the string?

I appreciate your hints!

bye,

Oliver

Dec 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
operator<< writes directly to output stream

class A {
friend ostream& operator<<(ostream& os, const A& a) {
os << ................
return os;
}
};

Oliver Block wrote:
Hi @ll,

I'am programming a class for big integer number. I needed one for
powers because int an long didn't fulfill my needs.

I coded some operators but now I am somehow lost. I store the digits
for my class in a valarray and I'd like to output them on cout for
example.

Is there a better way than to copy the digits to a String and return
the string?

I appreciate your hints!

bye,

Oliver

Dec 22 '05 #2

P: n/a
Hi,

my question refered to the dots. :-)

Never mind!

Dec 27 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.