Need help-Error istream header declaration


Posted on 16th Feb 2014 07:03 pm by admin

Hi Everyone ,

I am having issue with istream declaration. I am new to C programming.
can any one please help me ?

I am getting error in getNameValuePair.h and getNameValuePair.C code.

Here below the compilation result .

xlCcore -q64 -g -v -D_RWCONFIG=8s -D_RWSTD_NO_DEPRECATED_C_HEADERS=0 -D_RWSTD_NO_FORCE_RELATIVE_PATHS=0 -D_RWSTD_USE_USR_INCLUDE_HEADERS=0 -qnotempinc -qeh=v6 -qarch=auto -I/appl/dev/include -I/appl/dev/include/ansi -I/appl/dev -I/home/prod/itamac/iprs/iprs3.5/include -I/opt/oracle/product/10.2.0/precomp/public -I/usr/include -v -O -qsuppress=1500-029 -qidirfirst -qnotempinc -qcpp_stdinc=/appl/dev/include:/appl/dev/include/ansi:/appl/dev/include/leo:/usr/include -c getNameValuePair.C
exec: export(export,XL_CONFIG=/etc/vac.cfglCcore,NULL)
exec: export(export,XL_XLCMP_PATH=/usr/vac:/usr/vacpp,NULL)
exec: export(export,XL_COMPILER=xlc++,NULL)
exec: export(export,XL_ASMOBJFILES=/tmp/xlcAS00Qhid,NULL)
exec: /usr/vacpp/exe/xlCentry(/usr/vacpp/exe/xlCentry,-D_AIX,-D_AIX32,-D_AIX41,-D_AIX43,-D_AIX50,-D_AIX51,-D_AIX52,-D_AIX53,-D_IBMR2,-D_POWER,-D_RWCONFIG=8s,-D_RWSTD_NO_DEPRECATED_C_HEADERS=0,-D_RWSTD_NO_FORCE_RELATIVE_PATHS=0,-D_RWSTD_USE_USR_INCLUDE_HEADERS=0,-I/appl/dev/include,-I/appl/dev/include/ansi,-I/appl/dev,-I/home/prod/itamac/iprs/iprs3.5/include,-I/opt/oracle/product/10.2.0/precomp/public,-I/usr/include,-qosvar=aix.5.3,-qalias=ansi,-q64,-qlargetype,-g,-qnotempinc,-qeh=v6,-qarch=pwr5x,-O,-qsuppress=1500-029,-qidirfirst,-qnotempinc,-qcpp_stdinc=/appl/dev/include:/appl/dev/include/ansi:/appl/dev/include/leo:/usr/include,-qasm_as=/bin/as,-ogetNameValuePair.o,getNameValuePair.C,/tmp/xlcW000Qhia,/tmp/xlcW109Qhib,/dev/null,getNameValuePair.lst,/dev/null,/tmp/xlcW200Qhic,NULL)

"getNameValuePair.h", line 19.9: 1540-0040 (S) The text "&" is unexpected. "istream" may be undeclared or ambiguous.

"getNameValuePair.C", line 43.9: 1540-0040 (S) The text "&" is unexpected. "istream" may be undeclared or ambiguous.

unlink: /tmp/xlcAS00Qhid
unlink: /tmp/xlcW000Qhia
unlink: /tmp/xlcW109Qhib
unlink: /tmp/xlcW200Qhic
make: 1254-004 The error code from the last command is 1.

Stop.


Here below getNameValuePair.C header files declaration part

//#pragma VERSIONID "@(#)getNameValuePair.C 1.2"

// System Header Files
#include
#include
// #include
// Unit Header Files
#include "getNameValuePair.h"

//istream &
istream &getNameValuePair(string &name, // first token found on input line
string &value, // second token found on input line
istream (&input)) // stream from which to extract line

Here below content of getNameValuePair.h

// Interface to utility function to help parse a file of name-value pairs.
// Lines are broken into tokens separated by white space.
// Lines without tokens are ignored.
// Lines whose initial token begins with "#" are ignored.
// The first token on a line is assigned to name.
// If there is a second token, it is assigned to value.
// Any remaining tokens on the line are discarded.
#include
//#include
istream &getNameValuePair(string &name, string &value, istream &input = cin);

Can you please anyone help me out for this issue ?

we create service request to RW vendor about this compiler problem. they told us to change header file declaration part like to . ( the above code is not updated - original source code)
after we have done the changes also, it gives same error .

can any one tell me what should need to change in above code ?
Thanks is advance

No comments posted yet

Your Answer:

Login to answer
133 Like 46 Dislike
Previous forums Next forums
Other forums

Problem with "dynamic" index page
Hi. I have one question. In my index.php page I have this kind of code:
Code: // listaa sivut

BackButton Behaviour in AJAX
I have an ASPX Page AJAX Enabled!The page has a gridView and a DDL for filtering on it. The Gridview

Curl timeout breaks script
So im having difficulties with skipping timeout error in curl
my script calls different functions

use an array from 1 class in a second class
I have a class that adds data to an array

Then I have a second class and I need to check if t

upload image name with extension using php
hi frds..

<input id="file1" type="file" name="file[]" &a

Time-based image rotation script
I'm trying to write a PHP script that rotates an image based on what time of day it is. I want the

Passing an array of values From VB6.0 to Oracle PL/SQL Function
Basically we are using VB6.0.

When we try to pass an array from VB6.0 to an Oracle PL/SQL

Remove Rows From Database ad
Hi All,

I have this:

Code: [Select]<?php
session_start();
include('../com

New to Arrays
Hi I am new to PHP (a week and a half now) and I am just beginning to read about arrays. I understan

Filtering an Array Based on Value
I have a very simple script set up that pulls data from a database and is output using this code:

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash