Код: Выделить всё
#pragma once
#include
#include
#include
int main()
{
std::string connectionString = "host= port=5432 dbname= user= password=";
try
{
pqxx::connection connectionObject(connectionString.c_str());
pqxx::work worker(connectionObject);
pqxx::result response = worker.exec("SELECT * FROM Users");
for (size_t i = 0; i < response.size(); i++)
{
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/69874768/using-libpqxx-and-c-how-to-instantiate-a-connectionobject-and-an-worker-in-a[/url]