Open Source Your Knowledge, Become a Contributor
Technology knowledge has to be shared and made accessible for free. Join the movement.
C++
As I mentioned in the intro, this playground is still work in progress.
The remaining sections are not ready yet, only some code snippets and tutorial links are provided.
You can still check sample codes where they exist, or jump to the final, Conclusions page using the page selector above.
Volunteers for contributions for any of the missing pages are welcome!
Checking the sample code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <iostream>
#include <bitset>
using namespace std;
int main()
{
string m;
// getline(cin, m);
m = "CG";
string c[2] = {"00", "0"};
string b;
for (auto & ch: m)
b += bitset<7>(ch).to_string();
string a;
a += c[b[0] - '0'] + " 0";
for (int i = 1; i < b.length(); i++) {
if (b[i] == b[i - 1])
a += "0";
else
a += " " + c[b[i] - '0'] + " 0";
}
// cerr << "Debug messages..." << endl;
cout << a << endl;
}
Enter to Rename, Shift+Enter to Preview
Looking at the syntax
- TODO
Other characteristics
- TODO
Resources to check
Coming next...
After the C++ section, we can go forward to D :-), or we can go backwards to C. U'll c which 1 I chose...
Suggested playgrounds
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content