Bug 90908 - gcc ,g++ compile error
gcc ,g++ compile error
Status: CLOSED DUPLICATE of bug 91000
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
9
i686 Linux
high Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks: 98551
  Show dependency treegraph
 
Reported: 2003-05-15 04:57 EDT by Reaz
Modified: 2007-03-27 00:03 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 13:53:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Reaz 2003-05-15 04:57:21 EDT
Description of problem:
i have some program like this

# include <iostream>
# include <fstream>
using char std;
class Customer
{
private:
	char mobileNo[11];
	char name [25];
	char dateofBirth [9];
	char billingAddress [51];
	char city [25];
	char phoneNo [11];
	float amountOutstanding;
public:
	void print()
	{
	 	cout<< endl << "Mobile Phone number: " ;
	 	cout<< mobileNo << endl;
	 	cout<< "Name: ";
	 	cout<< name << endl;
	 	cout<< "Date of Birth: ";
	 	cout<< dateofBirth << endl;
	 	cout<< "Customer's billing address: ";
	 	cout<< billingAddress << endl;
		cout<< "City: ";
		cout<< city << endl;
		cout<< "Resident Phone number: ";
		cout<< phoneNo << endl;
		cout<< "Amount due: ";
		cout<< amountOutstanding << endl;
	}
	void get()
	{
		cout << "Mobile phone number: ";
		cin >> mobileNo;
		cin.ignore();
		cout << endl << "Name: ";
		cin.getline(name,25);
		cout << endl << "Date of Birth: ";
		cin >> dateofBirth;
		cin.ignore();
		cout << endl << "Customer's billing address: ";
		cin.getline(billingAddress,51);
		cout << endl << "City: ";
		cin.getline(city,25);
		cout << endl << "Residence phone number: ";
		cin >> phoneNo;
		cout << endl << "Amount due: ";
		cin >> amountOutstanding;
	}
};
int main ()
{
	Customer object;
	fstream file;
	char reply = 'Y';
	file.open ("customer.dat",ios::out|ios::app);
	while(reply == 'Y' || reply == 'Y')
	{
		cout << "Enter Customer details " <endl;
		object.get();
		file.write((char *)&object,sizeof(object));
		cout << "Do you wish to continue ?[y/n]";
		cin >> reply;
	}
	file.close();
	file.open ("customer.dat",ios::in);
	file.read((char *)&object, sizeof(object));
	while(file)
	{
		object.print();
		file.read((char *)&object, sizeof(object));
	}
	file.close();
	return 0;
} 

under rehat 7.0 when i compiler it with g++ or gcc it ok
but under rehdat9.0
i got error like cout undeclare(first use this function)

when i insert using namespace std;

no match for std::basic_osteram<char>,std::char_trits<char><&<<unknow 
type>'operator
Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
    
Actual results:


Expected results:


Additional info:
Comment 1 Jakub Jelinek 2003-06-19 09:41:07 EDT

*** This bug has been marked as a duplicate of 91000 ***
Comment 2 Red Hat Bugzilla 2006-02-21 13:53:02 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

Note You need to log in before you can comment on or make changes to this bug.