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; | |
class X { | |
public: | |
X() { | |
cout << "Constructor 1" << endl; | |
} | |
X(const X& h) { |
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
(ns mynamespace) | |
;; SEQUENCE REVERSE. | |
(def __ (fn seq-reverse [v] | |
(if (empty? v) | |
(empty v) | |
(conj (seq-reverse (butlast v)) (last v))))) | |
(def __ (fn seq-reverse [[a & rest]] |
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> | |
#include <string> | |
using namespace std; | |
int main() | |
{ | |
wstring result = L"hello"; | |
cout << "hello world." << endl; | |
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 <algorithm> | |
#include <iostream> | |
#include <iterator> | |
#include <map> | |
#include <utility> | |
using namespace std; | |
typedef map<int,int> my_map; | |
// WARNING: Altering the std namespace is UB. |
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 <algorithm> | |
#include <iostream> | |
#include <iterator> | |
#include <string> | |
#include <vector> | |
using namespace std; | |
int main() | |
{ | |
cout << "hello world." << endl; |
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 <fstream> | |
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
cout << "Hello world." << std::endl; | |
ofstream book("test.txt"); |
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; | |
class X { | |
public: | |
X() { | |
cout << "Constructor 1" << endl; | |
} | |
X(const X& h) { |
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> | |
#include <map> | |
#include <string> | |
using namespace std; | |
/******************************************************/ | |
/** Purpose: verify the default value for int as ******/ | |
/** a value in a map (value opposed to a key) ******/ | |
/******************************************************/ |
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 <algorithm> | |
#include <iostream> | |
#include <iterator> | |
#include <string> | |
#include <utility> | |
#include <vector> | |
using namespace std; | |
// -------------------------------------------------------------------------- |
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 <string> | |
#include <cstring> | |
int main() | |
{ | |
// const std::string test (0/*NULL*/); | |
const std::string test (0/*NULL*/, std::strlen(0)); | |
} |
OlderNewer