Services
Application Development
Programming
Website Design Packages
Banner Ad Design

SSS DIGITAL STORE

Products
Shaz Invoice Software
Shaz Password Manager

Portfolio
Sales and Order System
Electronic Diary
Medical Center System
Image Viewer
Website Development

Book Extracts
Design
Quality Assurance
Risk Management
Java Design
SDLC
Processors

Free Source Codes
Free Java Codes
Free C++ Codes
Free Php Scripts

Misc
Creation Theories 1
Creation Theories 2
Words Definition
Search Engine Optimization

Shaz Invoice Software
Downlaod Shaz Invoice Software
Purchase Shaz Invoice Software
Shaz Invoice Software Screen Shots
Shaz Invoice Software Types
Order a Custom Made Invoice

Shaz Invoice Software

Downlaod Shaz Invoice Software
Purchase Shaz Invoice Software
Shaz Invoice Software Screen Shots
Shaz Invoice Software Types
Order a Custom Made Invoice
 
 


Shaz Color Picker Desktop, make your own color formats or point your mouse in any part of the screen and get the color formats in RGB, HTML, HEX, HSB, and CMYK.
(Try the application above)


Following are some C++ code which could be used as methods inside a class or as functions and procedures at a structure design program.

int MyLibrary::GetRandomNo()
/*This method create a random no in range of 1 to 10000(change this no to get the random no in that range) and return it.*/
{
  int randomNo;

  srand(time(0));
  randomNo = 1+ rand() % 10000;
  return randomNo;
}


int MyLibrary::StringToInteger(string Key)
/* this method converts a string to an integer. It assumed the integer is in range of 1 to 10000. */
{
  int Len;
  bool KeyOk = true;
  int num;
  int mulby;
  int intKey=0;

  Len = Key.length(); // to get string length
  for(int i=0; i < Len; ++i)
  {
    /*if any characters in the string is not a digit the whole string is not an integer. */
    if(isdigit(Key[i]) == false )
      KeyOk = false; //the string is not an integer
  }
  if(KeyOk == true) // if the string is an integer
  {
    for(int j=0; j < Len; ++j) // change key from string to integer
    {
      num = GetInt(Key[j]); // get the equivalent integer number for each individual character
      mulby = GetFactor(Len - j); // get the number to be multiply by
      intKey = intKey + (num * mulby); // in process to integer number
    }
  }
  return intKey; // return the completed integer number
}


int MyLibrary::GetInt(char ch)
// this method converts a character number to an integer.
{
  return (int(ch) - int('0'));
}



int MyLibrary::GetFactor(int Factor)
/* this method return a number for multiplication. Factor is the position of a number in its integer number. */
{
  int num;

  /* Factor can not be more than 5, because GetRandomNo() method creates a random number in the range of 1 to 10000.*/

  switch (Factor)
  {
    case 5: num = 10000; // if a digit in string has the poistion of 5
    break;
    case 4: num = 1000; // if a digit in string has the poistion of 4
    break;
    case 3: num = 100; // if a digit in string has the poistion of 3
    break;
    case 2: num = 10; // if a digit in string has the poistion of 2
    break;
    case 1: num = 1; // if a digit in string has the poistion of 1
    break;
  }
  return num;
}

 

57% OFF

 

29% OFF

 

20% OFF

 

35% OFF

 
 
Software Development Life Cycle
Software Development Life Cycle


Home | About | Rate | Contact | Portfolio | Privacy Policy
Website Design Packages | Links | Sitemap

Free C++ Program Free C++ Code Free C++ Program Free C++ Source Code C++ Program Example C++ Program Sample
Free C++ Program Free C++ Code Free C++ Source Code Free C++ Code Free C++ Program Free C++ Download
Free C++ Source Code Free C++ Code Free C++ Program C++ Program Example C++ Program Sample C++ Program Example
C++ Program Sample Free C++ Source Code Free C++ Download C++ Program Example