C language > Windows questions
malloc and 64 bit ?
MrBcx:
This works for me, 32-bit and 64-bit, Windows 10 Pro:
--- Code: ---#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void)
{
char *x = (char*)malloc(128);
memset(x,0,128);
return 0;
}
--- End code ---
bitcoin:
It is very strange. Because I have a problem. Okay, sorry, this is probably a local error.
I use Windows 10, no antivirus.
---
If you run my exe file from attach, it works?
John Z:
Hi,
Yes as far as I can tell the original 1.exe from your zip runs just fine, no error report.
Attached is 1_me.exe from my compile. You can try it.
Attached is also a comparison of file size, mine is exactly 1K (1024) bytes larger.
John Z
bitcoin:
Your exe works fine
my - crashes with error
ok, thanks, maybe I need to re-install PellesC Ide
John Z:
Definitely something strange because your exe does not show any error on my system. maybe something corrupted on your system but might not necessarily be Pelles C. Still worth a try to re-install to get 'fresh' .lib files.
I'm on Windows 11 home edition 21H2 build 22000.1219 btw. I have windows 7 and windows 10 as well and I'm going to try your exe there too.
John Z
P.S. "No antivirus", but you are running Microsoft Defender and firewall I hope....
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version