No, they don't. You can make them do unexpected things, but you cannot breach security. You cannot use them to gain permissions you don't already have. (You might, under very special circumstances, be able to trick someone into executing your code.)
No, they don't. You can make them do unexpected things, but you cannot breach security. You cannot use them to gain permissions you don't already have. (You might, under very special circumstances, be able to trick someone into executing your code.)
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
system("pause"); causes my win '98 laptop pain!
Really, it overheats if I leave it for a few minutes.
That indicates to me that it's asking the cpu to do an endless loop or something. (way to go Bill guys...)
I just use a blocking function loop like while(getchar() != '\n'); in C or while(cin.get() != '\n'); in C++.
And re: pre- and post-increment / decrement :
Code:cout << endl << "Hit enter to continue"; while(cin.get() != '\n'); int x = 10; cout << x++ << endl; // prints 10 increments after usage so... cout << x << endl; // prints 11 the change shows up next time x is used cout << --x << endl; // prints 10 decrements before usage so shows up immediately cout << x-- << endl; // prints 10 after... cout << x << endl; // prints 9 get the idea?
Last edited by HowardL; 09-02-2008 at 04:01 PM.
Yes, Really. Running this alone causes fan to come on after about 10 minutes:
Sorry but I don't know of a way to view cpu usage in 98.Code:#include <iostream> #include <cstdlib> using namespace std; int main(void) { cout << "Hit the <any> key to continue" ; system("pause"); return 0; }
Looks like those tools become available for win2000 and up.
Last edited by HowardL; 09-02-2008 at 11:32 PM.
I'm pretty sure Win98 had a task manager with a process tab and CPU usage.
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
I think the bigger problem is that DOS-boxes in Win98 do not end up in Windows IDLE in the same way that a Win NT onwards DOS box does. DOS boxes in Win98 have completely different underlaying software functions, so it may well be that "PAUSE" doesn't stop the CPU from running at 100%.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.