There can be multiple causes for this behavior depending upon the
implementation of the C compiler. In all cases, you are over-writing an
area of storage allocated for the contents of the *a pointer. This area
may be in a initialized data segment (usually read-only), in a data
segment, or even t
Hello,
[ No Cygwin-specific issues here. ]
The compiler and / or linker are allowed to place those string literals in
read-only storage, and apparently gcc under Cygwin does just that.
If you modify your program like this:
-==-
#include
char *strsave(char *);
int main() {
// char *a =
===
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 07, 2002 2:09 PM
Subject: stackdump about C language
> Hi, gentleman, could you do me a favour?
> I had some trouble in running a C program.
You are trying to overwrite a static memory area
3 matches
Mail list logo