hi
please help me.
I need a short C++ code for reboot system(only c++)
can I do it?
thanks a lot
hi
please help me.
I need a short C++ code for reboot system(only c++)
can I do it?
thanks a lot
I'm assuming you did some research on this before asking. What information did you find when you entered, say, "c++ reboot" into your search engine of choice?
Controlling the computer with C++ - C++ Forum
Could try this? A quick google search found that one.
Perhaps you could show a bit of code you've tried that doesn't work (making sure your code is posted in code tags). You should also include your compiler and OS.
The point was more about how easy it is to find info on google. However, the risks of that have just been exposed!
why i can't do this project
I test every code,but it'll dose not work.
can you upload cpp file code?
I find a short code
I test it without any include and worked.but could not reboot system.I think this code have a little problem but it possible.please test this code and if you can find problem,say me too.
sorry again for my bad EN.
Code:void main(){ (*(void (far *)(void))0xffff0000L)();}
Are you trying to shutdown the computer? Or are you trying to crash the computer?
InitiateSystemShutdownEx function (Windows)
Tim S.
"...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson
You can follow this small thread from msdn forums:
msdn_reboot.htm
In other words, crappy DOS only 1-line tricks.
Mostly, you're just another script kiddie wannabe who thinks programming is trying to muck about with other peoples machines.
People genuinely interested in programming do not ask "how do I reboot...." as their first thread, and then proceed to recycle some stupid DOS code they found on the net.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.