Program not executing anything

Hey my name is Justen and I'm a first semester C++ student and im working on some code that needs some help. For some reason it wont execute anything anymore and i have no idea why. It was going along fine before i started adding the balance functions. I tried commenting things out and I cant find the source of the problem. Please help. Any help is appreciated! here is the code...

#include <iostream>
#include <iomanip>
#include <fstream>
using namespace std;
//capitalized customer first and last name
//capitalized customer movies
//screened user choice
//submenu for print

//handle movies with spaces
//return specific movies
//add more than one customer at a time
//screen for bad input for everything
//ask are you sure you really want to save or delete and load
//movie database no more than 10
//incorporate money
//free rental for specific event
//movie ratings with age check
//plus sell at register (Candy, Popcorn...)
//dependents
//better interface
//differnt sort routines (age, how many movies )
//focus searches
//add a password for certain menus
//sub menus for print, sort, rent movie




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
class customers
{
      private:
           string storeName;   
           string first [ 100 ];
           string last [ 100 ];
           int age [ 100 ];
           string movies[100][10];
           int howManyMovies[100];
           int howMany;
           //int balance[100];
           
      public:
           customers();
           void add();
           void printSubMenu();
           void printAll();
           void printMinors();
           void printAdults();
           void printPeopleMovies();
           void save();
           void load();
           void remove();
           //void sortAlpha();
           //void sortSubMenu();
           //void sortAgeHigh();
           //void sortAgeLow();
           //void sortAmountOfMovies();
           void swap( int which );
           void rent();
           void returnMovies();
           void intro();
           void printMovies();
           //void payBalance();
           
           
};
customers::customers()
{
     storeName = "Justen's Movies";
     howMany = 0;
     
};  

void customers::intro()
{
     cout << "                          Welcome to Justen's Movies!! " << endl;
     for ( int i = 0; i <= 3; i ++ )
     {
         for ( int j = 0; j < 80; j ++ )
         {
             cout << "#";
         }
     }
     cout << endl;
     return;
};
void customers::sortSubMenu()
{
     
     int choice;
     
     system("cls");
     cout << " How would you like them sorted? " << endl
          << "0 - Alphabetically " << endl
          << "1 - Age (starting high and going down) " << endl
          << "2 - Age (starting low and going up) " << endl
          << "3 - Amount of Movies " << endl
          << "What is your choice? " << endl;
     cin >> choice;
     
     while( cin.fail() || choice < 0 || choice > 3)
       {
            cin.clear(); // reset the state bits back to goodbit so we can use ignore()
            cin.ignore(1000, '\n');
            cout << "Sorry invalid choice...try again : ";
            cin >> choice; 
       }
     
     switch ( choice ) 
     {
            case 0:
                 sortAlpha();
                 break;
            case 1:
                 sortAgeHigh();
                 break;
            case 2:
                 sortAgeLow();
                 break;
            case 3:
                 sortAmountOfMovies();
                 break;
            default:
                   break;
     }
     return;
};

void customers::sortAgeHigh()
{
      for ( int i = 0; i < howMany - 1; i ++ )
     {
         for ( int j = 0; j < howMany - 1 - i; j ++ )
         {
             if ( age[j] < age[j+1] )
                swap(j);
         }
     }
     return;
};

void customers::sortAgeLow()
{
      for ( int i = 0; i < howMany - 1; i ++ )
     {
         for ( int j = 0; j < howMany - 1 - i; j ++ )
         {
             if ( age[j] > age[j+1] )
                swap(j);
         }
     }
     return;
};

void customers::sortAmountOfMovies()
{
     for ( int i = 0; i < howMany - 1; i ++ )
     {
         for ( int j = 0; j < howMany - 1 - i; j ++ )
         {
             if ( howManyMovies[j] < howManyMovies[j+1] )
                swap(j);
         }
     }
     return;
};
     
void customers::sortAlpha()
{
     for ( int i = 0; i < howMany - 1; i ++ )
     {
         for ( int j = 0; j < howMany - 1 - i; j ++ )
         {
             if ( first[j] > first[j+1] )
                swap(j);
         }
     }
     
     for ( int i = 0; i < howMany - 1; i ++ )
     {
         for ( int j = 0; j < howMany - 1 - i; j ++ )
         {
             if ( last[j] > last[j+1] )
                swap(j);
         }
     }
     
     return;
};

void customers::swap( int which )
{
     string strTemp;
     int intTemp;
     
     strTemp = first[which];
     first[which] = first[which + 1];
     first[which + 1] = strTemp;
     
     strTemp = last[which];
     last[which] = last[which + 1];
     last[which + 1] = strTemp;
     
     intTemp = age[which];
     age[which] = age[which + 1];
     age[which + 1] = intTemp;
     
     intTemp = balance[which];
     balance[which] = balance[which + 1];
     balance[which + 1] = intTemp;
     
     for ( int j = 0; j < howManyMovies[which]; j ++ )
     {
         strTemp = movies[which][j];
         movies[which][j] = movies[which + 1][j];
         movies[which + 1][j] = strTemp;
     }
     
     intTemp = howManyMovies[which];
     howManyMovies[which] = howManyMovies[which + 1];
     howManyMovies[which + 1] = intTemp;
     
     return;
};
     
     
     
     
     
void customers::add()
{
     system("cls");
     printAll();
     string saveAnswer;
     string answer;
     do{
        cout << "First name : ";
        cin >> first[howMany];
        first[howMany][0] = toupper(first[howMany][0]);
        cout << "Last name : ";
        cin >> last[howMany];
        last[howMany][0] = toupper(last[howMany][0]);
        cout << "Age : ";
        cin >> age[howMany];
        cout << "Would you like to save? : ";
        cin >> saveAnswer;
        if ( saveAnswer == "yes" || saveAnswer == "Yes" )
        {
             save();
        }
        cout << "Would you like to add another? : ";
        cin >> answer;
     }while( answer == "yes" || answer == "Yes" );
     
     howManyMovies[howMany] = 0;
     //balance[howMany] = 0;
     howMany ++;
     return;
};   

void customers::remove()
{
     int which;
     string answer;
     printAll();
     cout << endl << "Are you sure you want to do this? : ";
     cin >> answer;
     if ( answer == "yes" || answer == "Yes" )
     {
        cout << "Which customer do you wish to remove? : ";
        cin >> which;
     
        for ( int i = which; i < howMany - 1; i ++ )
        {
            first[i] = first[i+1];
            last[i] = last[i+1];
            age[i] = age[i+1];
            //balance[i] = balance[i+1];
         
            for ( int j = 0; j < howManyMovies[i+1]; j ++ )
            {
                movies[i][j] = movies[i+1][j];
            }
         
            howManyMovies[i] = howManyMovies[i+1];
         }
         howMany --;
     }
     return;
};
       
     

Last edited on
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
void customers::printAll()
{
     system("cls");
     
     cout << "#   First     Last       Age Bal  Movies    " << endl
          << "------------------------------------------" << endl;
          
          for ( int i = 0; i < howMany; i ++ ) 
          {
              cout << setw(4) << left <<  i 
                   << setw(10) << first[i]
                   << setw(11) << last[i]
                   << setw(4) << age[i];
                   //<< setw(5) << "$" << balance[i] << ".00";
                   
              for ( int j = 0; j < howManyMovies[i]; j ++ )
              {
                  cout << setw(10) << left << movies[i][j];
              }    
                   
              cout << endl;
          }
          cout << endl << "You have " << howMany << " customers in this catagory. " << endl;
          system("pause");
};

void customers::printSubMenu()
{
     int choice;
     
     system("cls");
     cout << "0 - All " << endl
          << "1 - Minors " << endl
          << "2 - Adults " << endl
          << "3 - People who have movies out " << endl
          << "4 - Who hasn't rented in a while " << endl
          << "Who do you want to print? " << endl;
     cin >> choice;

 while( cin.fail() || choice < 0 || choice > 4)
       {
            cin.clear(); // reset the state bits back to goodbit so we can use ignore()
            cin.ignore(1000, '\n');
            cout << "Sorry invalid choice...try again : ";
            cin >> choice; 
       }
     
     switch ( choice ) 
     {
            case 0:
                 printAll();
                 break;
            case 1:
                 printMinors();
                 break;
            case 2:
                 printAdults();
                 break;
            case 3:
                 printPeopleMovies();
                 break;
            //case 4 
                 //renters.printNonRenters();
                 //break;
            default:
                   break;
     }
     return;
};

void customers::payBalance()
{
     int which, howMuchPaid, change;
     cout << "Which customer wants to pay off thier balance? : ";
     cin >> which;
     
      while( cin.fail() )
       {
            cin.clear(); // reset the state bits back to goodbit so we can use ignore()
            cin.ignore(1000, '\n');
            cout << "Sorry invalid choice...try again : ";
            cin >> which; 
       }
       
     cout << "How Much did they pay? : ";
     cin >> howMuchPaid;
     
      while( cin.fail() )
       {
            cin.clear(); // reset the state bits back to goodbit so we can use ignore()
            cin.ignore(1000, '\n');
            cout << "Sorry invalid choice...try again : ";
            cin >> howMuchPaid; 
       }
     change = balance[which] - howMuchPaid;
     if ( change > 0 )
     {
        cout << "Their remaining balance is " << change;
        balance[which] = change;
     }
     else if ( change < 0 )
     {
          cout << "Thier change is " << change;
          balance[which] = 0;
     }
     else
     {
         cout << "Thank you for paying it off! ";
         balance[which] = 0;
     }
       
     return;
};

void customers::printMinors()
{
     int counter = 0;
     system("cls");
     cout << "#   First     Last       Age  Movies    " << endl
          << "------------------------------------------" << endl;
          
          for ( int i = 0; i < howMany; i ++ ) 
          {
              if ( age[i] < 18 )
              {
                 cout << setw(4) << left <<  i 
                      << setw(10) << first[i]
                      << setw(11) << last[i]
                      << setw(4) << age[i];
                 counter++;
                   
                 for ( int j = 0; j < howManyMovies[i]; j ++ )
                 {
                     cout << setw(10) << left << movies[i][j];
                 }  
                 cout << endl;  
              }
          }
          cout << endl << "You have " << counter << " customers in this catagory. " << endl;
          system("pause");
          return;
};

void customers:: printAdults()
{
     int counter = 0;
     system("cls");
     cout << "#   First     Last       Age  Movies    " << endl
          << "------------------------------------------" << endl;
          
          for ( int i = 0; i < howMany; i ++ ) 
          {
              if ( age[i] >= 18 )
              {
                 cout << setw(4) << left <<  i 
                      << setw(10) << first[i]
                      << setw(11) << last[i]
                      << setw(4) << age[i];
                 counter++;
                   
                 for ( int j = 0; j < howManyMovies[i]; j ++ )
                 {
                     cout << setw(10) << left << movies[i][j];
                 } 
                 cout << endl;   
              } 
          }
          cout << endl << "You have " << counter << " customers in this catagory. " << endl;
          system("pause");
          return;
};      

void customers::printPeopleMovies()
{
     int counter = 0;
     system("cls");
     cout << "#   First     Last       Age  Movies    " << endl
          << "------------------------------------------" << endl;
          
          for ( int i = 0; i < howMany; i ++ ) 
          {
              if ( howManyMovies > 0 )
              {
                 cout << setw(4) << left <<  i 
                      << setw(10) << first[i]
                      << setw(11) << last[i]
                      << setw(4) << age[i];
                 counter++;
                   
                 for ( int j = 0; j < howManyMovies[i]; j ++ )
                 {
                     cout << setw(10) << left << movies[i][j];
                 }  
                 cout << endl;  
              } 
          }
          cout << endl << "You have " << counter << " customers in this catagory. " << endl;
          system("pause");
          return;
};      


void customers::save()
{
     string answer;
     cout << "Are you sure you want to save? : ";
     cin >> answer;
     if ( answer == "yes" || answer == "Yes" )
     {
        ofstream writefile ("dbase.dat", ios::out );
     
        if ( !writefile )
        {
          cerr << "File couldn't be opened. ";
          exit(1);
        }
  
        writefile << howMany << " ";
     
        for ( int i = 0; i < howMany; i ++ )
        {
            writefile << first[i] << " " 
                      << last[i] << " " 
                      << age[i] << " "
                      << howManyMovies[i] << " ";
                      //<< balance[i] << " ";
                   
            for ( int j = 0; j < howManyMovies[i]; j ++ )
            {
                writefile << movies[i][j] << " ";
            }
        }
        writefile.seekp(0);
     }
     return;
};
void customers::load()
{
     string answer;
     cout << "Are you sure you want to load? : ";
     cin >> answer;
     if ( answer == "yes" || answer == "Yes" )
     {
        ifstream readfile ( "dbase.dat", ios::in );
        if ( !readfile )
        {
          cerr << "File couldn't be opened. ";
          exit(1);
        }
     
        readfile >> howMany;
     
        for ( int i = 0; i < howMany; i ++ )
        {
            readfile >> first[i] >> last[i] 
                     >> age[i] >> howManyMovies[i]; //>> balance[i];
                  
            for ( int j = 0; j < howManyMovies[i]; j ++ )
            {
                readfile >> movies[i][j];
            }   
        }
        readfile.seekg(0);
     }
     return;
};

Last edited on
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
void customers::rent()
{
     int which, movieNumber;
     string answer, saveAnswer;
     cout << "Which customer would like to rent? : ";
     cin >> which;
     do{
         cout << "What is the number of the movie? " << endl;
         printMovies();
         cin >> movieNumber;
         switch ( movieNumber)
         {
                case 0:
                     if ( age[which] < 18 )
                     {
                          cout << "Sorry this customer can't rent this movie...";
                     }
                     else
                     {
                          movies[which][howManyMovies[which]] = "Shooter";
                     }
                     break;
                case 1:
                     if ( age[which] < 13 )
                     {
                          cout << "Sorry this customer can't rent this movie...";
                     }
                     else
                     {
                          movies[which][howManyMovies[which]] = "Shrek";
                     }
                     break;
                case 2:
                     if ( age[which] < 18 )
                     {
                          cout << "Sorry this customer can't rent this movie...";
                     }
                     else
                     {
                          movies[which][howManyMovies[which]] = "Chronicle";
                     }
                     break;
                case 3:
                     if ( age[which] < 18 )
                     {
                          cout << "Sorry this customer can't rent this movie...";
                     }
                     else
                     {
                          movies[which][howManyMovies[which]] = "Inception";
                     }
                     break;
                case 4:
                     if ( age[which] < 18 )
                     {
                          cout << "Sorry this customer can't rent this movie...";
                     }
                     else
                     {
                          movies[which][howManyMovies[which]] = "Rambo";
                     }
                     break;
                case 5:
                     movies[which][howManyMovies[which]] = "Cinderella";
                     break;
                case 6:
                     movies[which][howManyMovies[which]] = "Wall-E";
                     break;
                case 7:
                     if ( age[which] < 13 )
                     {
                          cout << "Sorry this customer can't rent this movie...";
                     }
                     else
                     {
                          movies[which][howManyMovies[which]] = "Avatar";
                     }
                     break;
                case 8:
                     if ( age[which] < 13 )
                     {
                          cout << "Sorry this customer can't rent this movie...";
                     }
                     else
                     {
                          movies[which][howManyMovies[which]] = "Titanic";
                     }
                     break;
                case 9:
                     if ( age[which] < 18 )
                     {
                          cout << "Sorry this customer can't rent this movie...";
                     }
                     else
                     {
                          movies[which][howManyMovies[which]] = "Thor";
                     }
                     break;
         }
         
         howManyMovies[which] ++;
         cout << "would you like to save the new material? :";
         cin >> saveAnswer;
         
         while( cin.fail() )
         {
            cin.clear(); // reset the state bits back to goodbit so we can use ignore()
            cin.ignore(1000, '\n');
            cout << "Sorry invalid choice...try again : ";
            cin >> saveAnswer; 
         }
         
         if ( saveAnswer == "yes" || saveAnswer == "Yes" )
            save();
         cout << "Would they like to rent another? :";
         cin >> answer;
         
          while( cin.fail() )
       {
            cin.clear(); // reset the state bits back to goodbit so we can use ignore()
            cin.ignore(1000, '\n');
            cout << "Sorry invalid choice...try again : ";
            cin >> answer; 
       }
         
     }while( answer =="yes" || answer == "Yes" );
         
     
     howManyMovies[which] --;
     //balance[which]++;
     
     return;
};

void customers::printMovies()
{
     cout << " # | Movie Name    | Rating " << endl
          << "---------------------------------------------" << endl
          << " 0 | Shooter       | R " << endl
          << " 1 | Shrek         | PG-13 " << endl
          << " 2 | Chronicle     | NC-17 " << endl
          << " 3 | Inception     | R " << endl
          << " 4 | Rambo         | R " << endl
          << " 5 | Cinderella    | G " << endl
          << " 6 | Wall-E        | G " << endl
          << " 7 | Avatar        | PG-13 " << endl
          << " 8 | Titanic       | PG-13 " << endl
          << " 9 | Thor          | R " << endl;
          
          return;
};
          
     
     
void customers::returnMovies()
{
     int which, movieNumber;
     string answer;
     system("cls");
     printAll();
     cout << endl << "Which customer would like to return their movies? : ";
     cin >> which;
     cout << endl << "Which movie are they returning? : "; 
     cin >> movieNumber;
     for ( int i = movieNumber; i < howManyMovies[which]; i ++ )
     {
         movies[which][i] = movies[which][i+1];
     }
     
     howManyMovies[which]--;
     
     return;
};
     
     */
     
int main()
{
    customers renters;
    string password;
    int choice;
    /*
    cout << "                              PLEASE ENTER PASSWORD : ";
    cin >> password;
    
     while( cin.fail() )
       {
            cin.clear(); // reset the state bits back to goodbit so we can use ignore()
            cin.ignore(1000, '\n');
            cout << "Sorry invalid choice...try again : ";
            cin >> password; 
       }
    if ( password == "justen" )
    { 
    */
       do{
          system("cls");
       
          renters.intro();
       
          cout << "1 - Print" << endl
               << "2 - Save" << endl
               << "3 - Load" << endl
               << "4 - Add" << endl
               << "5 - Delete" << endl
               << "6 - Sort" << endl
               << "7 - Rent a Movie" << endl
               << "8 - Return movies" << endl
               << "0 - Quit" << endl
               << "Enter your choice : ";
          cin >> choice;
       
          while( cin.fail() || choice < 0 || choice > 8)
          {
            cin.clear(); // reset the state bits back to goodbit so we can use ignore()
            cin.ignore(1000, '\n');
            cout << "Sorry invalid choice...try again : ";
            cin >> choice; 
          }
       
          switch ( choice ) 
          { /*
                case 1:
                     renters.printSubMenu();
                     break; 
                case 2:
                     renters.save();
                     break;
                case 3:
                     renters.load();
                     break;
                case 4:
                     renters.add();
                     break;
                case 5:
                     renters.remove();
                     break;
                     /*
                case 6:
                     renters.sortSubMenu();
                     break; 
                case 7:
                     renters.rent();
                     break;
                case 8:
                     renters.returnMovies();
                     break;
                default:
                        break;*/
          }
    
    
          }while( choice != 0 );
    //}

    cout << "Goodbye! :) ";
    

 
    cout << endl << endl;
    system("pause");
    return 1;  
}
Last edited on
Do you think someone will manage to read thise huge code here and manage to solve your problem? Lol it may take weeks. I don't want to offend you but it's too much...
No I was not expecting anyone to solve it. I was hoping. this was just a shot in the dark.
Also, please indent and use [code] tags.
if you explain how I will
When you edit your post, highlight all of your code and press the <> button located to the right of the text window (it's with all the other formatting options).

Indentation is nothing we can really "tell" you how to do. :) You'll need to go through the basics of formatting a program which can be found all over the interwebs.
Thank you! again I'm new too this and any help on my code will help! I've worked on it for the past two days with no progress. I've taken some code out that I thought wasnt working correctly and nothing.
The likelihood of someone giving this more than a cursory glance with the vague assertion "it wont execute anything anymore" as the only hint towards what may be going wrong is rather small.

Does it compile? If it doesn't, what error message do you get? If it does compile, what happens when you run it? At what point does what is actually happening diverge from what you expect to happen? Does it hang? Does it cause a segmentation fault?

Can you reduce it to a smaller sample of code that exhibits the same problem? Did you read the sticky at the top of the forum?

If you don't help people to help you, help is often not forthcoming.
Yes it does compile. There are no errors. Yes I have been removing chunks of code to see if it will work. When it runs it doesn't put anything onto the screen. The program pops up the exe. window and the cursor just blinks and then closes on its own after about 10 seconds and the Norton on my computer freaks out and says that it is a virus. Again I'm not asking anyone to fix my code for me, this was just a long shot. I am continuously working on it to fix it myself. I was just hoping for some advice.
I'm able to run your code, and at the very least add in a user, although it does hang when I try to actually type in the user's name to rent a movie. Send me a PM with your email address and I'll send over the file - really don't wanna take up another 3 or so pages full of code here. :)

Also, void statements do not require any sort of return statement in them - you can remove these. And, typical organization when using prototypes for functions is to put the function definitions below the main body of your code. :)
Ok thank you for your input! I figured out that it is my laptop that is the problem. It executes on any other computer besides mine. I was pretty much looking for nothing, but my code is still in need of some work. Thanks for being understanding.
Topic archived. No new replies allowed.