This file contains hidden or 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> | |
| #include <stdio.h> /* for printf() and fprintf() */ | |
| #include <sys/socket.h> /* for socket(), bind(), and connect() */ | |
| #include <arpa/inet.h> /* for sockaddr_in and inet_ntoa() */ | |
| #include <stdlib.h> /* for atoi() and exit() */ | |
| #include <string.h> /* for memset() */ | |
| #include <unistd.h> /* for close() */ | |
| #define MAXPENDING 5 /* Maximum outstanding connection requests */ |
This file contains hidden or 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> | |
| #include <errno.h> | |
| #include <fcntl.h> | |
| #include <stdio.h> /* for printf() and fprintf() */ | |
| #include <sys/socket.h> /* for socket(), connect(), send(), and recv() */ | |
| #include <arpa/inet.h> /* for sockaddr_in and inet_addr() */ | |
| #include <stdlib.h> /* for atoi() and exit() */ | |
| #include <string.h> /* for memset() */ | |
| #include <unistd.h> /* for close() */ |
This file contains hidden or 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> | |
| #include <iomanip> | |
| int main() | |
| { | |
| const unsigned long long x = 0xFFFFFFFFFFFFFFFFFFFFFF; | |
| std::cout << std::hex << x << std::endl; | |
| } |
This file contains hidden or 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> | |
| #include <iomanip> | |
| #include <sstream> | |
| #include <iterator> | |
| int main() | |
| { | |
| const char c = 'E'; | |
| std::ostringstream os; | |
| os << std::hex << static_cast<int>(c); |
This file contains hidden or 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> | |
| #include <time.h> | |
| #include <unistd.h> | |
| int main() | |
| { | |
| std::cout << "hello" << std::endl; | |
| // sleep(5); | |
| clock_t start; | |
| start = clock(); |
This file contains hidden or 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> | |
| #include <time.h> | |
| #include <unistd.h> | |
| #include <pthread.h> | |
| #include <sched.h> | |
| #include <errno.h> | |
| int main() | |
| { | |
| std::cout << "hello" << std::endl; |
This file contains hidden or 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 <vector> | |
| #include <iostream> | |
| template <int VAL> | |
| struct another_template_type | |
| { | |
| int dummy; | |
| another_template_type(const int i = 0) : m_i(i) {} | |
| int m_i; |
This file contains hidden or 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 <vector> | |
| #include <iostream> | |
| template <int VAL> | |
| struct another_template_type | |
| { | |
| int dummy; | |
| another_template_type(const int i = 0) : m_i(i) {} | |
| int m_i; |
This file contains hidden or 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> | |
| #include <string> | |
| using namespace std; | |
| int main() | |
| { | |
| wstring result = L"hello"; | |
| cout << "hello world." << endl; | |
This file contains hidden or 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> | |
| #include <iterator> | |
| #include <vector> | |
| int main() | |
| { | |
| std::vector<int> vec; | |
| vec.push_back(1); | |
| vec.push_back(2); | |
| vec.push_back(3); |