Archive for May, 2013

This is a link to my program on github that converts char into int.

Would love to get a feedback or suggestions πŸ™‚

//  This block of code performs conversion char to int
//  Returning '0' if not a number
//  ascToInt.cpp
//  Created by Alexander on 2013-05-21.
//  Copyright (c) 2013 Alexander. All rights reserved.
#include <iostream>

using namespace std;
int ascToInt(const char *ch);

int main(){  //sample main() where you can test the function
  int num;
  char* str;
  cout<<"Enter a number: ";
  num = ascToInt(str);
  cout<<"number = "<<num<<endl;
  return 0;

int ascToInt(const char *ch){
  int out;
  int calc;
  out = 0;
  calc = 1;
  while (((*ch) == '+') || ((*ch) == '-')){  //checking the sign
    if (*ch == '-') calc = calc * -1; //if negative
  do{ //converting char by char
    out = (out * 10) + ((*ch) - '0'); //substracting 48 to get the real number
  }while((*ch <= '9') && (*ch >= '0'));  //checking if it’s a number
  return (out * calc);



This program concatenates n amounts of strings, so in the output the user will see one long string.

using namespace std;const char* nstrcat(char* to, ...);
int main(){  //Sample main() to test the program
    char str[100] = "";
    char first[] = "Space";
    char second[] = "Explorer";
    cout&lt;&lt;nstrcat(str, first, " ", second, " HeeHaw", '')&lt;&lt;endl;
    return 0;
const char* nstrcat( char* to, ...){
  char* inTo;
  int i = 0;
  va_list varg;
  va_start(varg, to);
  inTo = va_arg(varg, char*);
  while(inTo &amp;&amp; *inTo){	//returns '1' if true
  		to[i] = *inTo;
  		i++;         //keep going through the arguments
  	inTo = va_arg(varg, char*);
  return to;

There is a reason for what ever happens in your life…you’ll get it afterwords…just stay calm and clever for a while…

It’s better not to make fast decisions, not to be in a hurry, not to say simple and bad words to your friends, relatives and second halves… Life is a really very complicated thing, that has it’s own soul and vision. No one knows what could happened next, in ten years, in two years, even tomorrow…

Some people say that there are human beings, who knows the future, who can predict it, I’m not sure (to be honest), if they exist or not… I think I’ll believe only if I meet someone one day.

So the point is that people, we are, must not give up, we MUST, be in action every moment, we MUST do something, something that could be helpful for everyone, we MUST make difference and support each other…

Just some thoughts inside my head…//cc.admix

Here we go…

Posted: May 30, 2013 in Uncategorized

Decided to start/move my blog to the WordPress πŸ˜‰ Will see how it goes here…