title: d aGetting error while connecting to Postgres via dev c++
body: <p>I am trying to get connected to Postgres database via Dev-c++ (Windows application and not console) for executing queries, but I am continuously getting errors.</p>
  
  <p>I went through the following link: 
  <a href="http://www.tutorialspoint.com/postgresql/postgresql_c_cpp.htm" rel="nofollow">http://www.tutorialspoint.com/postgresql/postgresql_c_cpp.htm</a>
  and added the below code to that of mine:</p>
  
  <pre><code>     #include &lt;iostream&gt;
       #include &lt;pqxx/pqxx&gt; 
  
       using namespace std;
       using namespace pqxx;
  
       int main(int argc, char* argv[])
       {
        try{
            connection C("dbname=testdb user=postgres password=cohondob \
            hostaddr=127.0.0.1 port=5432");
            if (C.is_open()) {
            cout &lt;&lt; "Opened database successfully: " &lt;&lt; C.dbname() &lt;&lt; endl;
            } else {
            cout &lt;&lt; "Can't open database" &lt;&lt; endl;
            return 1;
             }
          C.disconnect ();
          }catch (const std::exception &amp;e){
          cerr &lt;&lt; e.what() &lt;&lt; std::endl;
          return 1;
          }
          }
  </code></pre>
  
  <p>But got error stating: 
  'No such file or directory
   #include  
  Compilation terminated'</p>
  
  <p>Please, Can anyone help me get through this?
  is there any other possible way to get connected?</p>