Why can't I get this to work?

Hi all, I have tried to combine 2 sketches into 1 but no matter what I try nothing is working. I am posting the code so everyone can take a look at it. I believe i have it in the right spot but at this point I just don't know. It compiles with arduino 23 and I load it in and the time still works. This part I cannot figure where to put in:
void printTemp(void) {
double fTemp;
double temp = Thermister(analogread(0);
lcd.clear();
lcd.setCursor(0,0);
lcd.setCursor(0,1);
ftemp = (temp * 1.8) + 32.0;
lcd.print(fTemp);
lcd.print( "F" );
}
void loop(void) {
printTemp();
delay(1000);

}
here is the full sketch

/*

originally written by Christian, cptbjorn@gmail.com

*/

#include "Wire.h" 
#define DS1307_I2C_ADDRESS 0x68 //set rtc
#include <LiquidCrystal.h> // initialize the library with the numbers of the interface pins
#include <math.h>
LiquidCrystal lcd(12, 13, 4, 5, 6, 7);   // typically 8, 9, 4, 5, 6, 7
                                         // have to change to free up more pwm pins

byte decToBcd(byte val)    // Convert normal decimal numbers to binary coded decimal
{
  return ( (val/10*16) + (val%10) );
}

byte bcdToDec(byte val)    // Convert binary coded decimal to normal decimal numbers
{
  return ( (val/16*10) + (val%16) );
}

// 1) Sets the date and time on the ds1307
// 2) Starts the clock
// 3) Sets hour mode to 24 hour clock
// Assumes you're passing in valid numbers
void setDateDs1307(byte second, // 0-59
byte minute, // 0-59
byte hour, // 1-23
byte dayOfWeek, // 1-7
byte dayOfMonth, // 1-28/29/30/31
byte month, // 1-12
byte year) // 0-99
{
  Wire.beginTransmission(DS1307_I2C_ADDRESS);
  Wire.send(0);
  Wire.send(decToBcd(second)); // 0 to bit 7 starts the clock
  Wire.send(decToBcd(minute));
  Wire.send(decToBcd(hour));   // If you want 12 hour am/pm you need to set
  // bit 6 (also need to change readDateDs1307)
  Wire.send(decToBcd(dayOfWeek));
  Wire.send(decToBcd(dayOfMonth));
  Wire.send(decToBcd(month));
  Wire.send(decToBcd(year));
  Wire.endTransmission();
}
double Thermister(int RawADC) {
  double Temp;
  // See http://en.wikipedia.org/wiki/Thermistor for explanation of formula
  Temp = log(((10240000/RawADC) - 10000));
  Temp = 1 / (0.001129148 + (0.000234125 * Temp) + (0.0000000876741 * Temp * Temp * Temp));
  Temp = Temp - 273.15;           // Convert Kelvin to Celcius
  return Temp;
}
// Gets the date and time from the ds1307
void getDateDs1307(byte *second,
byte *minute,
byte *hour,
byte *dayOfWeek,
byte *dayOfMonth,
byte *month,
byte *year)
{
  // Reset the register pointer
  Wire.beginTransmission(DS1307_I2C_ADDRESS);
  Wire.send(0);
  Wire.endTransmission();

  Wire.requestFrom(DS1307_I2C_ADDRESS, 7);

  // A few of these need masks because certain bits are control bits
  *second = bcdToDec(Wire.receive() & 0x7f);
  *minute = bcdToDec(Wire.receive());
  *hour = bcdToDec(Wire.receive() & 0x3f); // Need to change this if 12 hour am/pm
  *dayOfWeek = bcdToDec(Wire.receive());
  *dayOfMonth = bcdToDec(Wire.receive());
  *month = bcdToDec(Wire.receive());
  *year = bcdToDec(Wire.receive());
}

void onesecond() //function that runs once per second while program is running
{
  byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
  getDateDs1307(&second, &minute, &hour, &dayOfWeek, &dayOfMonth, &month, &year);
  lcd.begin(16, 2);
  lcd.clear();
  lcd.setCursor(0, 0);
  if(hour>0)
  {
    if(hour<=12)
    {
      lcd.print(hour, DEC);
    }
    else
    {
      lcd.print(hour-12, DEC);
    }
  }
  else
  {
    lcd.print("12");
  }
  lcd.print(":");
  if (minute < 10) {
    lcd.print("0");
  }
  lcd.print(minute, DEC);
  lcd.print(":");
  if (second < 10) {
    lcd.print("0");
  }
  lcd.print(second, DEC);
  if(hour<12)
  {
    lcd.print("am");
  }
  else
  {
    lcd.print("pm");
  }
  lcd.print(" ");
  delay(1000);
}

void setup() {
 // pinMode(ledPin1, OUTPUT);    // set the digital pin as output:
 // pinMode(ledPin2, OUTPUT);    // set the digital pin as output:
  
  byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
  Wire.begin();

  // Change these values to what you want to set your clock to.
  // You probably only want to set your clock once and then remove
  // the setDateDs1307 call.
  second = 56;
  minute = 57;
  hour = 23;
  dayOfWeek = 6;  // Sunday is 0
  dayOfMonth = 26;
  month = 2;
  year = 11;
  //setDateDs1307(second, minute, hour, dayOfWeek, dayOfMonth, month, year);
  lcd.begin(16, 2); // set up the LCD's number of rows and columns: 
}
void loop()
{
  onesecond();
  byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
  getDateDs1307(&second, &minute, &hour, &dayOfWeek, &dayOfMonth, &month, &year);
  int daybyminute = ((hour * 60) + minute); //converts time of day to a single value in minutes
      
}  // END LOOP

but no matter what I try nothing is working.

and

and the time still works

Contradict each other.
Please state what actually happens and what you expect to happen.
Please post all code using the # icon as you can see your code is scrambled.

what the program should do is display time and also display water tank temp. If I load each program by itself they work and the display works. The way the code is now, I only get my time to display and nothing else.

So put the lines:-

printTemp();
    delay(1000);

inside the loop() function. And add printTemp() function at the end of the sketch.

I added that in and now I get expected unqualified-id before "{" token. It only gave me the 1 error and said line 105: Updated code:

/*

originally written by Christian, cptbjorn@gmail.com

*/

#include "Wire.h" 
#define DS1307_I2C_ADDRESS 0x68 //set rtc
#include <LiquidCrystal.h> // initialize the library with the numbers of the interface pins
#include <math.h>
LiquidCrystal lcd(12, 13, 4, 5, 6, 7);   // typically 8, 9, 4, 5, 6, 7
                                         // have to change to free up more pwm pins

byte decToBcd(byte val)    // Convert normal decimal numbers to binary coded decimal
{
  return ( (val/10*16) + (val%10) );
}

byte bcdToDec(byte val)    // Convert binary coded decimal to normal decimal numbers
{
  return ( (val/16*10) + (val%16) );
}

// 1) Sets the date and time on the ds1307
// 2) Starts the clock
// 3) Sets hour mode to 24 hour clock
// Assumes you're passing in valid numbers
void setDateDs1307(byte second, // 0-59
byte minute, // 0-59
byte hour, // 1-23
byte dayOfWeek, // 1-7
byte dayOfMonth, // 1-28/29/30/31
byte month, // 1-12
byte year) // 0-99
{
  Wire.beginTransmission(DS1307_I2C_ADDRESS);
  Wire.send(0);
  Wire.send(decToBcd(second)); // 0 to bit 7 starts the clock
  Wire.send(decToBcd(minute));
  Wire.send(decToBcd(hour));   // If you want 12 hour am/pm you need to set
  // bit 6 (also need to change readDateDs1307)
  Wire.send(decToBcd(dayOfWeek));
  Wire.send(decToBcd(dayOfMonth));
  Wire.send(decToBcd(month));
  Wire.send(decToBcd(year));
  Wire.endTransmission();
}
double Thermister(int RawADC) {
  double Temp;
  // See http://en.wikipedia.org/wiki/Thermistor for explanation of formula
  Temp = log(((10240000/RawADC) - 10000));
  Temp = 1 / (0.001129148 + (0.000234125 * Temp) + (0.0000000876741 * Temp * Temp * Temp));
  Temp = Temp - 273.15;           // Convert Kelvin to Celcius
  return Temp;
}
// Gets the date and time from the ds1307
void getDateDs1307(byte *second,
byte *minute,
byte *hour,
byte *dayOfWeek,
byte *dayOfMonth,
byte *month,
byte *year)
{
  // Reset the register pointer
  Wire.beginTransmission(DS1307_I2C_ADDRESS);
  Wire.send(0);
  Wire.endTransmission();

  Wire.requestFrom(DS1307_I2C_ADDRESS, 7);

  // A few of these need masks because certain bits are control bits
  *second = bcdToDec(Wire.receive() & 0x7f);
  *minute = bcdToDec(Wire.receive());
  *hour = bcdToDec(Wire.receive() & 0x3f); // Need to change this if 12 hour am/pm
  *dayOfWeek = bcdToDec(Wire.receive());
  *dayOfMonth = bcdToDec(Wire.receive());
  *month = bcdToDec(Wire.receive());
  *year = bcdToDec(Wire.receive());
}

void onesecond(); //function that runs once per second while program is running
void printTemp(void) 
 { double fTemp;
  double temp = Thermister(analogRead(0));  // Read sensor
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.setCursor(0,1); 
  fTemp = (temp * 1.8) + 32.0;    // Convert to USA
  lcd.print(fTemp);
  lcd.print(" F");
}

{
  byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
  getDateDs1307(&second, &minute, &hour, &dayOfWeek, &dayOfMonth, &month, &year);
  lcd.begin(16, 2);
  lcd.clear();
  lcd.setCursor(0, 0);
  if(hour>0)
  {
    if(hour<=12)
    {
      lcd.print(hour, DEC);
    }
   else
    {
      lcd.print(hour-12, DEC);
    }
  }
  else
  {
    lcd.print("12");
  }
  lcd.print(":");
  if (minute < 10) {
    lcd.print("0");
  }
  lcd.print(minute, DEC);
  lcd.print(":");
  if (second < 10) {
    lcd.print("0");
  }
  lcd.print(second, DEC);
  if(hour<12)
  {
    lcd.print("am");
  }
  else
  {
    lcd.print("pm");
  }
  lcd.print(" ");
  delay(1000);
}

void setup() {
 // pinMode(ledPin1, OUTPUT);    // set the digital pin as output:
 // pinMode(ledPin2, OUTPUT);    // set the digital pin as output:
  
  byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
  Wire.begin();

  // Change these values to what you want to set your clock to.
  // You probably only want to set your clock once and then remove
  // the setDateDs1307 call.
  second = 56;
  minute = 57;
  hour = 23;
  dayOfWeek = 6;  // Sunday is 0
  dayOfMonth = 26;
  month = 2;
  year = 11;
  //setDateDs1307(second, minute, hour, dayOfWeek, dayOfMonth, month, year);
  lcd.begin(16, 2); // set up the LCD's number of rows and columns: 
}
void loop()
{
  onesecond();
  byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
  getDateDs1307(&second, &minute, &hour, &dayOfWeek, &dayOfMonth, &month, &year);
  int daybyminute = ((hour * 60) + minute); //converts time of day to a single value in minutes
  printTemp();
delay(1000)  
}  // END LOOP

The function printTemp ends at line 93 with the closing curly brace. The next thing you have after that is an opening curly brace, but it lacks any kind of function to be opening. Either those two braces need to be removed so that both of those blocks of code are one function, or the second block needs a return type and function name.

You also appear to be missing a semicolon on the last delay.

You have got the code proper screwed up.
You get that error message because the code at that point is not in a function definition.

Then you have the lines:-

void onesecond(); //function that runs once per second while program is running
void printTemp(void)

Which looks like it is trying to define two functions at the same time.

So could it be that your code that is not in a function is actually supposed to be defining the onesecond() function?
It compiles if it is, apart from the missing ; at the end.

Thank you for all the help. I think what I really need to do is learn the language better, then start with writing simple codes and move up to this. I need to learn more before just copying and pasting stuff together. Would c++ visual be a good starting point? Once again, thank you.

Forget C++ just go for C to start with.

Have a look at Processing (http://processing.org/). The IDE is the same as Arduino's, and the basic language is very similar.

Have a look at Processing (http://processing.org/).

...but not if you want to confuse yourself when trying to program your Arduino.
Processing is based on Java, but Arduino is based on C/C++.