Hello There, Guest! Login Register
Advertise Here | Remove Ads

Need Help How to check if my program would run out of memory

  • 0 Vote(s) - 0 Average


09-27-2016, 02:27 AM #1
Paglufan Offline FFU NEWCOMER FFU NEWCOMER
Posts:21 Threads:7 Joined:Oct 2014 Reputation: 0
I had a school assignment to write a program, which is now past but I still don't understand how the whole thing should work. So I was asked to write a program in C to read a .txt file and display an error message if the program runs out of memory.

So my question is can anyone show me an example of code which displays an error message if the program runs out of memory?

10-03-2016, 07:13 PM #2
top49 Offline FFU NEWCOMER FFU NEWCOMER
Posts:15 Threads:5 Joined:Sep 2016 Reputation: 0 Sex Male
Country: Romania
I think it referes to that fact that int can take values -32,767 to 32,767  so if it's 32,768 will be an error, something like this i think






Forum Jump:


Users browsing this thread:1 Guest(s)

Advertise Here | Remove Ads