How to input and output without Cin and Cout - pleas help me !!

Hi guy i am new nember and nice to meet verry body in forum
I have a question: How to Input and Output Without Cin and Cout .
Thanks for read my question !
Pleas help me !
In C they often use printf and scanf but you can use them in C++ too if you want.
Why do you want to do this?
I am always a little confused by questions of the form: “how do you do X without using <language feature designed to do X>”
apart from the C routines there are probably hundreds of ways to do this 'nonstandardly' -- you can directly read the hardware (may need a __asm{} block or OS level call), you can use GUI tools (eg directinput or getwindowtext() in windows, and whatever in QT or Mac or linux GUI libraries), you can read from shared memory, files, pipes, network sockets, and so on. You can even call another program to do it for you -- for example you can steal the keystrokes typed into notepad and feed them to your program with some process level hackery.

for the most part, just because you can do something, does not make it worth doing. cin and cout should be used for console programming. the appropriate gui tools should be used for gui programs. Files and networking should be used for file and networking tasks and not general user input, etc. Hardware traps should be justified carefully if you are not writing a device driver.
Last edited on
Alas, until Gagavn tells us exactly what he is trying to accomplish, there is really no good way to answer the question...
For output, write busy loops with varying iterations along with sleeps and interpret the temperature of your CPU as binary (ASCII/UTF-8) or morse code. Seems like something interesting to program, to see how accurate the signal can get (or rather, what the max throughput achievable is). Most likely an off-topic post, sorry.
Last edited on
Topic archived. No new replies allowed.