Bug 90908

Summary: gcc ,g++ compile error
Product: [Retired] Red Hat Linux Reporter: Reaz <r-cassim>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED DUPLICATE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: high    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 18:53:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 98551    

Description Reaz 2003-05-15 08:57:21 UTC
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 13:41:07 UTC

*** This bug has been marked as a duplicate of 91000 ***

Comment 2 Red Hat Bugzilla 2006-02-21 18:53:02 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.