This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin seg faults using dyn. memory



>
>cygwin seg faults when i attempt to assign values to
>allocated dynamic memory.  The same code isn't
>seg-faulting on a Compaq Tru64 UNIX V5.1A machine.
>
>   is there a setting where the heap needs to be
>adjusted?  are there libraries i need to include that
>i haven't?
>
>here's the embarassingly simple problematic code:
>
>#include "Name.h"
>#include "readItem.h"
>#include <iostream.h>
>#include <string.h>
>
>using namespace std;
>
>int main() {
>
>Name * dummy2;
>dummy2 = new Name;
>cin >> dummy2;
>cin >> *dummy2;
>cout << *dummy2;
>
>return 0;
>}
>---------------------------------------------------

since you havent given the contents of your local header files
nor your compile line ...
I dont see how the solution is going to be forthcomming.

Gareth

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]