All, Need some help here. I am from a purely Java background and don't know much about C programming. Basically I need to write a C program (and create an executable) which would output the number of Free Bytes (RAM) on a Windows machine (XP/2008/7)
I have doing some research about it and found that there is a function called GlobalMemoryStatusEx and also a link on this: http://msdn.microsoft.com/en-us/library/aa366589(v=vs.85).aspx
I have installed cygwin with gcc and the above program doesn't even compile for me. I know I am doing something stupid here..
$ gcc hello.c -o hello.exe
hello.c:3:19: error: tchar.h: No such file or directory
hello.c: In function `main':
hello.c:7: error: `MEMORYSTATUSEX' undeclared (first use in this function)
hello.c:7: error: (Each undeclared identifier is reported only once
hello.c:7: error: for each function it appears in.)
hello.c:7: error: expected `;' before `statex'
hello.c:9: error: `statex' undeclared (first use in this function)
Any help is very much appreciated!