🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: att.lang.c++
Article #149

Re: Help: problems using cin and cout

#149
From: Srinivas Junnuru
Date: Wed, 20 Jan 1999 00:00
47 lines
2283 bytes
Thanks for the reply.


The situation is: A main Cobol85 program calls a C++ function (say CPPFUNC).
What all CPPFUNC has is two cout and one cin statements.
When I link and run the cobol program, I can see that it first gets into the
cobol program (as I have some display statements in it) and then it goes
into CPPFUNC.. As soon as it hits the cout and cin statements I get a
segmentation violation... There is nothing fancy in this CPPFUNC... Now, if
I replace the cin and cout with scanf and printf statements, the program
works great!!! So, what am I missing here???

FYI, I am working on HP-UX, using HP aCC and Cobol85 compilers.

Thanks in advance.

-Srini


--

(Srinivas Junnuru)
Note: Pl. remove NOSPAM from my address to e-mail me.

Martijn Lievaart wrote in message <78502s$7ue@news3.euro.net>...
>Srinivas Junnuru wrote in message <784487$cvu$1@news.mr.net>...
>> Can some one tell me what are all the libraries needed for using cin and
>> cout??  I am getting segmentation violation at run time if I use cin and
>> cout.. Also, what are all the libraries available for streaming??
>>
>
>
>If your program links, you have all libraries correct. If it crashes at
>runtime, you made an error in your program. I have a good guess what it is,
>but I'll have to see your source code first to know for sure.
>
>I'm not sure what you mean by "all the libraries available for streaming".
>
>HTH,
>Martijn
>--
>My reply-to address is intentionally set to /dev/null
>reply to mlievaart at orion in nl
>
>
>
>
Technical Details
Message-ID: <784eea$efn$1@news.mr.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <784487$cvu$1@news.mr.net> <78502s$7ue@news3.euro.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109fba,cbc70b249c29f52f
X-Google-Attributes: gid109fba,public
X-Google-Thread: 10d4ba,cbc70b249c29f52f
X-Google-Attributes: gid10d4ba,public
From: "Srinivas Junnuru" <sjunnuru@NOSPAMwrbc.com>
Subject: Re: Help: problems using cin and cout
Date: 1999/01/20
Message-ID: <784eea$efn$1@news.mr.net>
X-Deja-AN: 434875810
References: <784487$cvu$1@news.mr.net> <78502s$7ue@news3.euro.net>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
X-Complaints-To: abuse@mr.net
X-Trace: news.mr.net 916831498 14839 206.144.255.1 (20 Jan 1999 11:24:58 GMT)
Organization: MRNet
NNTP-Posting-Date: 20 Jan 1999 11:24:58 GMT
Newsgroups: att.lang.c++,comp.lang.c++