Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. *char connect[256], read[256];
  2. strcpy(connect, "host=");
  3. printf("host");
  4. scanf( "%s", &read);
  5. strcat(connect,read);
  6. strcat(connect," port=");
  7. scanf( "%s", &read);
  8. strcat(connect,read);
  9. strcat(connect," dbname=");
  10. scanf( "%s", &read);
  11. strcat(connect,read);
  12. strcat(connect," user=");
  13. scanf( "%s", &read);
  14. strcat(connect,read);
  15. strcat(connect," password=");
  16. scanf( "%s", &read);
  17. strcat(connect,read);
  18. //printf("%s",connect);
  19. PGconn *myconnection = PQconnectdb(connect)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement