Victor on July 26th, 2010

void showTree(QObject* theparent){    cout << "\nMember: " + theparent->objectName() + " – Parent: " +  theparent->parent()->objectName(); }

Continue reading about Exercise : QObject’s Child Management.

Victor on June 9th, 2010

So I haven’t programmed in two weeks. The C++ book is still pegged to the second section. I know I have to finish what I started before the next semester starts. This unfinished work reminds me of the many things that I have left behind hoping that I will pick up ‘next time’, when I [...]

Continue reading about I haven’t programmed in over two weeks.

Victor on May 16th, 2010

A quick note on Facebook: A lot of blogging has been going on about how privacy settings have been rigged in favor of Facebook vs User. While outrage should be expected, rationale should also be coupled with that outrage. The rationale is understood using the web unknowns. Web unknowns: 1. Any transaction over the internet [...]

Continue reading about Facebook ramble and other things.

Victor on May 8th, 2010

#include <iostream> using namespace std; void change(int a); int main(int argc,char *argv[]){   double purchaseAmount = 0.0;   double payment = 0.0;   int totalChange = 0;   cout << "\nEnter purchase amount :\t";   cin >> purchaseAmount;   cout << "\nEnter Payment :\t";   cin >> payment;   totalChange = (payment * 100)-(purchaseAmount * [...]

Continue reading about Getting change C++

#include <iostream> #include <string> #include <cstdlib> #include <ctime> using namespace std; int diceThrow(); void result(int a); void lostThrow(int a); int choice = 0; int whileLoop = 0; int main(int argc,char *argv[]){     while(whileLoop == 0){     cout << "Let\’s play dice\n"     "Press 1 to exit or 2 to throw the dice\n"; [...]

Continue reading about The game is about repeated “throws” of a pair of dice. Each die has six faces, numbered 1 through 6. A throw results in a number which is the total of the two top faces. The first throw establishes the player’s number. If that number is 7 or 11, the player automatically wins. If that number is 2, the player automatically loses. Otherwise, the player continues throwing until she wins (by matching her number) or loses (by throwing a 7 or an 11).