调试的时候,出来C++ config.h
好像说我的iostream有错误,大家帮我看看:
2 j:\DEV-CPP\include\c++\3.4.2\iostream:44, from 13.11-1main.cpp In file included from j:/DEV-CPP/include/c++/3.4.2/iostream:44, from 13.11-1main.cpp
2 D:\My Documents\C++\13.11-1main.cpp from 13.11-1main.cpp
57 j:\DEV-CPP\include\c++\3.4.2\mingw32\bits\c++config.h expected unqualified-id before "namespace"
57 j:\DEV-CPP\include\c++\3.4.2\mingw32\bits\c++config.h expected `,' or `;' before "namespace"
61 j:\DEV-CPP\include\c++\3.4.2\mingw32\bits\c++config.h expected namespace-name before ';' token
61 j:\DEV-CPP\include\c++\3.4.2\mingw32\bits\c++config.h `<type error>' is not a namespace
D:\My Documents\C++\13.11-1main.cpp In function `int main()':
16 D:\My Documents\C++\13.11-1main.cpp `cout' undeclared (first use this function)
===================================================================main()
#include "cd.h"
#include <iostream>
using namespace std;
#include <cstdlib>
void Bravo(const Cd &disk);
int main()
{
Cd c1("Beatles","Capital",14,35.5);
Classic c2=Classic("Piano Sonata in B flat,Fantasia in C","Alfred Brendel",
"Philips",2,57.17);
Cd *pcd=&c1;
cout<<"Using object diretly: \n";
c1.Report();
c2.Report();
cout<<"Using type cd *pointer to objects: \n";
pcd->Report();
pcd=&c2;
pcd->Report();
cout<<"Calling a funcion with a Cd reference argument: \n";
Bravo(c1);
Bravo(c2);
cout<<"Testing assignment: ";
Classic copy;
copy=c2;
copy.Report();
system("pause");
}
void Bravo (const Cd &disk)
{
disk.Report();
}