Re: [INTERFACES] in pgconnection.h (?)

Поиск
Список
Период
Сортировка
От Mike Mascari
Тема Re: [INTERFACES] in pgconnection.h (?)
Дата
Msg-id 38580392.AD9C8449@mascari.com
обсуждение исходный текст
Ответ на [INTERFACES] in pgconnection.h (?)  (Richard <blackw@sfu.ca>)
Список pgsql-interfaces
Richard wrote:

> I'm putting together my first C++ pgsql client program and have run into
> a snag.  I #include <pgdatabase.h>, but when I compile, I get a message
> saying
>
>    /usr/include/pgsql/libpq++/pgconnection.h:24: string: No such file or
> directory
>
> Looking in pgconnection.h, I see
>
>    #include <string>
>
> (Call me old-fashioned, but I thought us C hacks had agreed to use ".h"
> when naming our include files.)  Later on in the file I see the
> declaration
>
>    string IntToString(int);
>
> Now, I assume that "string" is a class.  But where would I find the
> header file "string"?
>
> Thanks in advance for clarifying what is clearly !obvious to me.
>
> Cheers,
> Richard Blackwell
>
>

The string class should have come with the standard C++ libraries installed
with your C++ compiler. For instance, on my RedHat 5.2 machine, I have:

$ cat /usr/include/g++/string

// Main header for the -*- C++ -*- string classes.

#ifndef __STRING__
#define __STRING__

#include <std/bastring.h>

extern "C++" {
typedef basic_string <char> string;
// typedef basic_string <wchar_t> wstring;
} // extern "C++"

#endif





В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Richard
Дата:
Сообщение: [INTERFACES] in pgconnection.h (?)
Следующее
От: Christophe M
Дата:
Сообщение: Compatibility postgresql6.5.3 and psqlodbc drivers