combining several variables into one

I have a program where there are four numbers shown on an LCD. Pressing the up or down button increases or decreases the count, based on where the "cursor count" is.

After all four numbers are in, i want to string together the four variables into one variable, such that char1,char2,car3 etc, are now string1, or string2, or 3, etc.

i am thinking that i want to use an array, but i can't wrap my head around it. The next bit of the UI that i havent written will be to confirm the number. if number is confirmed, i then want to write it to the EERPOM so that if the arduino turns off the user does not have to reinput everything. I'll read up on that, but right here i just want to make sure im on the right track to using it correctly.

I am using an UNO R3 with an Adafruit_RGB_LCD.

the following is an excerpt of the count section, the whole code follows in the next code box

  if (cursCnt == 0) {                 //change char1 for string_a
      lcd.setCursor(9, 0);
      lcd.print("_");

      if (buttons & BUTTON_UP) {
        chara1++;
        delay(800);
        lcd.setCursor(9, 1);
        lcd.print(chara1);
      }
      if (buttons & BUTTON_DOWN) {
        chara1--;
        delay(800);
        lcd.setCursor(9, 1);
        lcd.print(chara1);
      }
    }
    if (cursCnt == 1) {
      lcd.setCursor(10, 0);
      lcd.print("_");

      if (buttons & BUTTON_UP) {
        chara2++;
        delay(800);
        lcd.setCursor(10, 1);
        lcd.print(chara2);
      }
      if (buttons & BUTTON_DOWN) {
        chara2--;
        delay(800);
        lcd.setCursor(10, 1);
        lcd.print(chara2);
      }
#include <Wire.h>
#include <Adafruit_MCP23017.h>
#include <Adafruit_RGBLCDShield.h>
Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();

#define RED 0x1
#define YELLOW 0x3
#define GREEN 0x2
#define TEAL 0x6
#define BLUE 0x4
#define VIOLET 0x5
#define WHITE 0x7

int butCnt = 0;

int string_a;       //will be the grouping of the following 4entries
int chara1 = 0;
int chara2 = 0;
int chara3 = 0;
int chara4 = 0;
int string_b;
int charb1 = 0;
int charb2 = 0;
int charb3 = 0;
int charb4 = 0;

int cursCnt = 0;     //sets position of where to type

void setup() {
  Serial.begin (115200);
  lcd.begin (16, 2);
  lcd.clear();
  lcd.println("To begin, press ");
  lcd.setCursor(5, 1);
  lcd.println("SELECT          ");
  uint8_t i = 0;
}
void loop() {
  // put your main code here, to run repeatedly:
  uint8_t buttons = lcd.readButtons();
  if (buttons) {
    if (buttons & BUTTON_SELECT) {
      lcd.clear();
      lcd.print("string:");
      lcd.setCursor(9, 1);
      lcd.print(chara1);
      lcd.setCursor(10, 1);
      lcd.print(chara2);
      lcd.setCursor(11, 1);
      lcd.print(chara3);
      lcd.setCursor(12, 1);
      lcd.print(chara4);
    }
    if (buttons & BUTTON_RIGHT) {    //moves cursor to right by increment, then resets the scren
      cursCnt++;
      delay(800);
      Serial.print(cursCnt);
      lcd.clear();
      lcd.print("string:");
      lcd.setCursor(9, 1);
      lcd.print(chara1);
      lcd.setCursor(10, 1);
      lcd.print(chara2);
      lcd.setCursor(11, 1);
      lcd.print(chara3);
      lcd.setCursor(12, 1);
      lcd.print(chara4);
    }
    if (buttons & BUTTON_LEFT) {
      cursCnt--;
      delay(800);
      Serial.print(cursCnt);
      lcd.clear();
      lcd.print("string:");
      lcd.setCursor(9, 1);
      lcd.print(chara1);
      lcd.setCursor(10, 1);
      lcd.print(chara2);
      lcd.setCursor(11, 1);
      lcd.print(chara3);
      lcd.setCursor(12, 1);
      lcd.print(chara4);
    }
    if (cursCnt == 0) {                 //change char1 for string_a
      lcd.setCursor(9, 0);
      lcd.print("_");

      if (buttons & BUTTON_UP) {
        chara1++;
        delay(800);
        lcd.setCursor(9, 1);
        lcd.print(chara1);
      }
      if (buttons & BUTTON_DOWN) {
        chara1--;
        delay(800);
        lcd.setCursor(9, 1);
        lcd.print(chara1);
      }
    }
    if (cursCnt == 1) {
      lcd.setCursor(10, 0);
      lcd.print("_");

      if (buttons & BUTTON_UP) {
        chara2++;
        delay(800);
        lcd.setCursor(10, 1);
        lcd.print(chara2);
      }
      if (buttons & BUTTON_DOWN) {
        chara2--;
        delay(800);
        lcd.setCursor(10, 1);
        lcd.print(chara2);
      }
    }
    if (cursCnt == 2) {
      lcd.setCursor(11, 0);
      lcd.print("_");

      if (buttons & BUTTON_UP) {
        chara3++;
        delay(800);
        lcd.setCursor(11, 1);
        lcd.print(chara3);
      }
      if (buttons & BUTTON_DOWN) {
        chara3--;
        delay(800);
        lcd.setCursor(11, 1);
        lcd.print(chara3);
      }
    }
    if (cursCnt == 3) {
      lcd.setCursor(12, 0);
      lcd.print("_");

      if (buttons & BUTTON_UP) {
        chara4++;
        delay(800);
        lcd.setCursor(12, 1);
        lcd.print(chara4);
      }
      if (buttons & BUTTON_DOWN) {
        chara4--;
        delay(800);
        lcd.setCursor(12, 1);
        lcd.print(chara4);
      }
    }
    string_a=
    if (cursCnt==4){
      lcd.clear();
      lcd.print("CONFIRM A: ");
      lcd.print
  }
}

thanks

Perhaps you may want to do a search for sprintf().

Or bit shifting with type long variables.

newneo_phyte:
I have a program where there are four numbers shown on an LCD. Pressing the up or down button increases or decreases the count, based on where the "cursor count" is.

After all four numbers are in, i want to string together the four variables into one variable, such that char1,char2,car3 etc, are now string1, or string2, or 3, etc.

you are talking four numbers, right

int mySolution = chara1 + 10*chara2 + 100*chara3 + 1000*chara4;
lcd.print(mySolution);

i am thinking that i want to use an array, but i can't wrap my head around it.

Have you read this:-
http://www.thebox.myzen.co.uk/Tutorial/Arrays.html