To toggle a block comment
--
Clt+d
--
and to remove a block comment
--
Clt+Shift+d.
That's it.
Monday, July 29, 2013
Monday, July 22, 2013
From "list" in python to "vector" in C++
We can do this easily in Python but we need some new things to do this in C++.
An example of randomly generating heterogeneous numbers is shown below.
std::vector<int> groupI;
int k;
do {
k = 0 + (std::rand() % (int)(41 - 0 + 1));
}
while (std::find(groupI.begin(), groupI.end(), k) != groupI.end());
groupI.push_back (k);
And we got it. :)
An example of randomly generating heterogeneous numbers is shown below.
std::vector<int> groupI;
int k;
do {
k = 0 + (std::rand() % (int)(41 - 0 + 1));
}
while (std::find(groupI.begin(), groupI.end(), k) != groupI.end());
groupI.push_back (k);
And we got it. :)
Subscribe to:
Posts (Atom)