944,185 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Marked Solved
  • Views: 723
  • C++ RSS
Oct 3rd, 2009
0

Would this do damage to my computer?

Expand Post »
Would this do any damage if I left it running for a while:

c++ Syntax (Toggle Plain Text)
  1. int main(){ while(1) new char[0]; }
Similar Threads
Reputation Points: 9
Solved Threads: 5
Posting Pro
tomtetlaw is offline Offline
591 posts
since Sep 2008
Oct 3rd, 2009
2

Re: Would this do damage to my computer?

It seems like you are trying to make a code to send somebody a
harmful .exe.

Therefore I will not tell you.

If i am wrong then say so, trusting you not to lie.
Last edited by firstPerson; Oct 3rd, 2009 at 11:58 am.
Reputation Points: 840
Solved Threads: 594
Senior Poster
firstPerson is offline Offline
3,865 posts
since Dec 2008
Oct 3rd, 2009
1

Re: Would this do damage to my computer?

Damage? I doubt it. The physical memory would quickly run out, and then your pc would automatically free all the memory you allocated when you restart the pc or somehow close it.
Last edited by William Hemsworth; Oct 3rd, 2009 at 12:25 pm.
Reputation Points: 1429
Solved Threads: 129
Posting Virtuoso
William Hemsworth is offline Offline
1,542 posts
since Mar 2008
Oct 3rd, 2009
-1

Re: Would this do damage to my computer?

I am in no way trying to send this to someone to harm their computer, I am just curious about what the outcome would be.
Reputation Points: 9
Solved Threads: 5
Posting Pro
tomtetlaw is offline Offline
591 posts
since Sep 2008
Oct 3rd, 2009
0

Re: Would this do damage to my computer?

If you're curious, test it on your own computer
I just did, and it did exactly what I said it would.
Reputation Points: 1429
Solved Threads: 129
Posting Virtuoso
William Hemsworth is offline Offline
1,542 posts
since Mar 2008
Oct 3rd, 2009
0

Re: Would this do damage to my computer?

Thanks for the answer
Reputation Points: 9
Solved Threads: 5
Posting Pro
tomtetlaw is offline Offline
591 posts
since Sep 2008
Oct 3rd, 2009
-1

Re: Would this do damage to my computer?

If you're curious, test it on your own computer
I just did, and it did exactly what I said it would.
Not really a good idea.
Reputation Points: 840
Solved Threads: 594
Senior Poster
firstPerson is offline Offline
3,865 posts
since Dec 2008
Oct 3rd, 2009
1

Re: Would this do damage to my computer?

Not really a good idea.
Why not?
Featured Poster
Reputation Points: 2614
Solved Threads: 687
Posting Expert
VernonDozier is offline Offline
5,375 posts
since Jan 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: assigning inputs to string arrays error
Next Thread in C++ Forum Timeline: How to find the product of two matrix?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC