You are using a version without Ads of this website. Please, consider donating:

### Heat conduction through a window HELP

Im trying to find the heat conduction for 3 different substances and i just recently downloaded microsoft visual 2012. I tried making cases for each part and after inputting the parts to see if it runs what i have so far, but it gives me an error: error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup

#include <iostream> // Allows input and output.
#include <cmath> // Allows you to use the power function

using namespace std; //needed to use std, groups entities like classes

double[]x = new double[15]
// equations: T1 = t + (((P/A)/k)) Δx. Ti+1 = Ti + ((P/A)/ki+1) Δx.
void case1a(int temp)
{
int pA=0;
float deltax=1E-5;
float k3=.84;

double t= temp + (((pA)/(k3+1)))*deltax;
cout<<t<<endl;
}

void case1b(int temp)
{
int pA=0;
float deltax=1E-5;
float k3=.018;

double t= temp + (((pA)/(k3+1)))*deltax;
cout<<t<<endl;
case1a(t);
}

void case1c(int temp)
{
int pA=0;
float deltax=1E-5;
float k3=.84;

double t= temp + (((pA)/(k3+1)))*deltax;
cout<<t<<endl;
case1b(t);
}

// case 2

void case2a(int temp)
{
int pA=400;
float deltax=1E-5;
float k3=.84;

double t= temp + (((pA)/(k3+1)))*deltax;
cout<<t<<endl;
}

void case2b(int temp)
{
int pA=400;
float deltax=1E-5;
float k3=.018;

double t= temp + (((pA)/(k3+1)))*deltax;
cout<<t<<endl;
case2a(t);
}

void case2c(int temp)
{
int pA=400;
float deltax=1E-5;
float k3=.84;

double t= temp + (((pA)/(k3+1)))*deltax;
cout<<t<<endl;
case2b(t);
}

// case 3

void case3a(int temp)
{
int pA=400;
float deltax=1E-5;
float k3=.84;

double t= temp + (((pA)/(k3+1)))*deltax;
cout<<t<<endl;
}

void case3b(int temp)
{
int pA=400;
float deltax=1E-5;
float k3=.84;

double t= temp + (((pA)/(k3+1)))*deltax;
cout<<t<<endl;
case3a(t);
}

void case3c(int temp)
{
int pA=400;
float deltax=1E-5;
float k3=.84;

double t= temp + (((pA)/(k3+1)))*deltax;
cout<<t<<endl;
case3b(t);
}

//case 4

void case4a(int temp)
{
int pA=400;
float deltax=1E-5;
float k3=.84;

double t= temp + (((pA)/(k3+1)))*deltax;
cout<<t<<endl;
}

void case4b(int temp)
{
int pA=400;
float deltax=1E-5;
float k3=.024;

double t= temp + (((pA)/(k3+1)))*deltax;
cout<<t<<endl;
case3a(t);
}

void case4c(int temp)
{
int pA=400;
float deltax=1E-5;
float k3=.84;

double t= temp + (((pA)/(k3+1)))*deltax;
cout<<t<<endl;
case3b(t);
}

//case 5

void case5a(int temp)
{
int pA=400;
float deltax=1E-5;
float k3=.84;

double t= temp + (((pA)/(k3+1)))*deltax;
cout<<t<<endl;
}

void case5b(int temp)
{
int pA=400;
float deltax=1E-5;
float k3=.018;

double t= temp + (((pA)/(k3+1)))*deltax;
cout<<t<<endl;
case3a(t);
}

void case5c(int temp)
{
int pA=400;
float deltax=1E-5;
float k3=.84;

double t= temp + (((pA)/(k3+1)))*deltax;
cout<<t<<endl;
case3b(t);
}

int main()
{
case1c(-20);
case2c(-20);
case3c(-20);
case4c(-20);
case5c(-20);
system("pause");
return 0;
}
PLEASE USE CODE TAGS!!! They can be found in the <> section of the forum editor. I cannot even read that without them.
Just from a cursory glace you start with the problem
 `` `` ``double[]x = new double[15]``

which only needs to be
 `` `` ``double x[15];``

this array of doubles isn't even used in your code either.....

Also you might want to look into best practices and naming conventions. case1a and so forth are not great names for functions. You also have numerous functions that are doing the exact same thing and thats really unneeded.
Last edited on
Topic archived. No new replies allowed.