Hey all,

I am having trouble with the ""std_lib_facilities.h" header. I am getting the complier message:

error C2614: 'String' : illegal member initialization: 'string' is not a base or member

I am going through Bjarne Stroustrup's - Programming Principles and Practice Using C++ and he suggests that if you cant get your hands on the "std_lib_facilities.h" you can use:

#include "iostream"
#include<string>
#include<vector>
#include<algorithm>
#include<cmath>
using namespace std;
inline void keep_window_open() {char ch; cin>>ch; }

instead. But I use these headers I am getting a complier message:

error C2065: 'error' : undeclared identifier

Basicially if I could get the "std_lib_facilities.h" working or if I knew what header to include that has the 'error' in it I would be greatful. Thanks for your help.

Colm

Recommended Answers

All 4 Replies

Yes, old good (or most likely bad) VC++ 6.0 can't compile String member template from std_lib_facilities.h. However why #include "iostream" instead of <iostream>?

Better try to download and install VC++ 2008 Express (or Code::Blocks with MinGW/gcc compiler)...

commented: Thanks for good advice +1

I didn't get any errors compililing those headers with VC++ 6.0

#include "stdafx.h"
#include "iostream"
#include<string>
#include<vector>
#include<algorithm>
#include<cmath>
using namespace std;
inline void keep_window_open() {char ch; cin>>ch; }

int main(int argc, char* argv[])
{
	return 0;
}

Thanks for the replies,

I downloaded MS C++ 2008 Express (free to download fully from microsoft!!) but unfortunately it can not support MFC Programming which I need. Thanks again for your help.

Colm.

there is not the head file,it is the author
<<Stroustrup: Programming -- Principles and Practice Using C++>> define.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.