fork(1) download
  1. #include<string>
  2. #include<iostream>
  3.  
  4. using std::string;
  5. using namespace std;
  6.  
  7. class Connection {
  8. public:
  9. Connection();
  10. string conexao;
  11. string getConexao();
  12. };
  13.  
  14. Connection::Connection() {
  15. conexao = "sete de setembro";
  16. }
  17.  
  18. string Connection::getConexao() {
  19. cout << conexao << endl;
  20. return conexao;
  21. }
  22.  
  23. int main(void) {
  24. Connection con;
  25. con.getConexao();
  26. }
  27.  
  28. //https://pt.stackoverflow.com/q/96152/101
Success #stdin #stdout 0s 4472KB
stdin
Standard input is empty
stdout
sete de setembro