delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/02/22/00:46:36

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Originating-IP: [129.78.64.17]
From: "Gareth Pearce" <tilps AT hotmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Cygwin seg faults using dyn. memory
Date: Fri, 22 Feb 2002 05:44:52
Mime-Version: 1.0
Message-ID: <F135q3dUO0a4DlRtHTW0000437a@hotmail.com>
X-OriginalArrivalTime: 22 Feb 2002 05:44:53.0607 (UTC) FILETIME=[0D395770:01C1BB64]

>
>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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019