Re: C++ operating system
Posted: Tue Dec 23, 2008 7:24 pm
puts() and gets() are the easiest!
The Place to Start for Operating System Developers
http://f.osdev.org/
As... for example... implementing a simple factory to create a stream from the GRUB's argument string, and then use it as the kernel's cout?ru2aqare wrote:I would argue with that. No, you can't use the cin and cout that comes with your compiler or C++ library. But you can always write it for yourself and define it to do whatever you want it to do - send ouput to serial port, to screen or whatever.
As for exactly how it can be done, I don't know - I don't use many features of the C++ language in my kernel. But there should be a way to do it.
I agree. Printf uses a very complicated convention to format the strings, where cout just uses operator association to convey the same result.Alboin wrote:Kind of off topic, but cout and cin are not really that tricky to implement. If anything, they're easier and less hacky than their C counterparts.But it would take a lot of work