This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <arpa/inet.h> | |
#include <string> | |
using std::string; | |
string getSocketIP(int socketDescriptor) | |
{ | |
string ipAddress; | |
unsigned short remotePort; // port as well if you need it | |
sockaddr address; | |
socklen_t theSize = sizeof(address); | |
const int BUFFER_LEN = 60; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if( | |
param1>param2 and | |
param2>param3 and | |
param4>0 | |
): | |
return "ok" | |
return "not ok" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
using namespace std; | |
struct Test2 | |
{ | |
int value; | |
int get_value()const { | |
return value; | |
} | |
void inc_val(){ |