title: Error unresolved externals and unresolved external symbol
body: <p>I get an error of unresolved externals error LNK1120 and error LNK2019: unresolved external symbol "void __cdecl crt_acc(class std::basic_string,class std::allocator > * const,int)" (?crt_acc@@YAXQAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) referenced in function _main  C:\Users\user\documents\visual studio 2010\Projects\Programming Assignment\Programming Assignment\Programming Assignment.obj</p>
  
  <p>How i need to solve this? Emergency...</p>
  
  <p>[UPDATED CODE IS HERE]</p>
  
  <pre><code>int main ()
  {
      //Declare Variable
      string car_num[10], car_brand[50], car_model[50], car_colour[50], car_year[10], car_eng_cap[10], car_tran[10], car_cost[100];//string array for account information
      string enter_acc_num,search_car;
      int menu, cnt=0, check=0;
      int menu2;
      char selection;
  
      start_menu();//Run the Start Menu Function
      do
      {
          size_t count=0;//put into a loop to refresh back to 0 everytime
          read_data_file(car_num, car_brand, car_model, car_colour, car_year, car_eng_cap, car_tran, car_cost);//Run read data file function (it update the array everytime when it in the loop)
          for(size_t i=0; i&lt;sizeof(car_num)/sizeof(*car_num); i++)//Small loop to identify the size of array car_num[10]
          {
              if(car_num[i]!="")
                  count++;
          }
          cnt=count;
          system("cls");//Clear the screen
          cout&lt;&lt;"\n\tMENU"&lt;&lt;endl;
          cout&lt;&lt;"//////////////////////////////////////////////////"&lt;&lt;endl;
          cout&lt;&lt;"\n\t01. \tCREATE A NEW CAR ACCOUNT"&lt;&lt;endl;
          cout&lt;&lt;"\n\t02. \tEDIT A CAR ACCOUNT"&lt;&lt;endl;
          cout&lt;&lt;"\n\t03. \tREMOVE A CAR ACCOUNT"&lt;&lt;endl;
          cout&lt;&lt;"\n\t04. \tSEARCH A CAR "&lt;&lt;endl;
          cout&lt;&lt;"\n\t05. \tCHECK TOTAL INVENTORY"&lt;&lt;endl;
          cout&lt;&lt;"\n\t06. \tEXIT"&lt;&lt;endl;
          cout&lt;&lt;"\n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"&lt;&lt;endl;
          cout&lt;&lt;"\tSelect Your Option(1-6)";
          cin&gt;&gt;menu; //User enter the selection (1-6)
          system("cls");//Clear the screen
          //Selection
          switch(menu)
          {
          case 1://User has select option 1
              {
              crt_acc(car_num, cnt);//Pass to create account function
          }
          break;
          case 2://User has select option 2
              {
                  cout&lt;&lt;"\nEnter car registration number:";
                  cin&gt;&gt;enter_acc_num; //Identify which account to be edited
                      check=enter_acc_num.length();
                      if(check&lt;=8)
                      {
                          edit_account(enter_acc_num, car_num, car_brand, car_model, car_colour, car_year, car_eng_cap, car_tran, car_cost, cnt);//Pass to edit account function
                      }
                      else
                          cout&lt;&lt;"Please enter a valid car registration number."&lt;&lt;endl; //Inform user to enter a valid number
              }
              break;
  
  
          case 3://User has select option 3
              {
                  cout&lt;&lt;"\nEnter car registration number:";
                  cin&gt;&gt;enter_acc_num;//Identify which account to be deleted
                  check=enter_acc_num.length();//Constraint for input
                  if(check&lt;8)
                  {
                      for(int x=0; x&lt;cnt; x++)
                      {
                          if(enter_acc_num==car_num[x])
                          {
                              cout&lt;&lt;"Are you sure want to remove the car account? (Y/N) "; //Ask user if really want to remove the account
                              cin&gt;&gt;selection;
                              switch(toupper(selection))
                              {
                              case'Y':
                                  {
                                      remove_account(enter_acc_num, car_num, car_brand, car_model, car_colour, car_year, car_eng_cap, car_tran, car_cost, cnt);//Pass to delete account function
                                      cout&lt;&lt;"The Car Account successfully deleted."&lt;&lt;endl;
                                  }
                                  break;
                              case 'N':
                                  {
                                      cout&lt;&lt;"Operation has been canceled, back to menu screen."&lt;&lt;endl; //Nothing will happen if user choose no option for remove account
                                  }
                                  break;
                              }
                          }
                      }
                  }
                  else
                      cout&lt;&lt;"Please enter a valid car registration number!"&lt;&lt;endl; //Inform user to enter a valid number
              }
              break;
          case 4: //Option 4
              {
                  cout&lt;&lt;"Which field you want enter to search a car:"&lt;&lt;endl;//Ask user enter which field want to search car
                  cout&lt;&lt;"\t01. Car Brand"&lt;&lt;endl;
                  cout&lt;&lt;"\t02. Car Model"&lt;&lt;endl;
                  cout&lt;&lt;"\t03. Year of Manufacturing"&lt;&lt;endl;
                  cout&lt;&lt;"\t04. Price"&lt;&lt;endl;
                  cout&lt;&lt;"\t05. Cancel"&lt;&lt;endl;
                  cout&lt;&lt;"Which Option (0-5)?"&lt;&lt;endl;
                  cin&gt;&gt;menu2;
                  switch(menu2)
                  {
                  case 1: //Option 1
                      {
                          cout&lt;&lt;"Enter Car Brand:"&lt;&lt;endl;
                          cin&gt;&gt;search_car; //Identify which car brand to be search
                          for(int x=0; x&lt;cnt; x++) //Loop to last account, by using cnt we can stop when the array is a null
                          {
                              if(search_car==car_brand[x])//Detecting which car brand same as user input
                              {
                                  cout&lt;&lt;"\n\tCar Registration Number:"&lt;&lt;car_num[x]&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tCar Make or Brand:"&lt;&lt;car_brand[x]&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tCar Model:"&lt;&lt;car_model[x]&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tCar Colour:"&lt;&lt;car_colour[x]&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tYear of Manufacturing:"&lt;&lt;car_year[x]&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tEngine Capacity:"&lt;&lt;car_eng_cap[x]&lt;&lt;"cc"&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tTransmission:"&lt;&lt;car_tran[x]&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tCost of Car: RM"&lt;&lt;car_cost[x]&lt;&lt;endl;
                              }
                              else
                                  cout&lt;&lt;"No data is founded."&lt;&lt;endl;
                              break;
                          }
                      }
                  case 2: //Option 2
                      {
                          cout&lt;&lt;"Enter Car Model:"&lt;&lt;endl;
                          cin&gt;&gt;search_car; //Identify which car model to be search
                          for(int x=0 ; x&lt;cnt ; x++)
                          {
                              if(search_car==car_model[x])//Detecting which car model same as user input
                              {
                                  cout&lt;&lt;"\n\tCar Registration Number:"&lt;&lt;car_num[x]&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tCar Make or Brand:"&lt;&lt;car_brand[x]&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tCar Model:"&lt;&lt;car_model[x]&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tCar Colour:"&lt;&lt;car_colour[x]&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tYear of Manufacturing:"&lt;&lt;car_year[x]&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tEngine Capacity:"&lt;&lt;car_eng_cap[x]&lt;&lt;"cc"&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tTransmission:"&lt;&lt;car_tran[x]&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tCost of Car: RM"&lt;&lt;car_cost[x]&lt;&lt;endl;
                              }
                              else
                                  cout&lt;&lt;"No data is founded."&lt;&lt;endl;
                              break;
                          }
                      }
                  case 3: //Option 3
                      {
                          cout&lt;&lt;"Enter Year of Manufacturing:"&lt;&lt;endl;
                          cin&gt;&gt;search_car;
                          for(int x=0; x&lt;cnt; x++)
                          {
                              if(search_car==car_year[x])//Detecting which car manufacturing year same as user input
                              {
                                  cout&lt;&lt;"\n\tCar Registration Number:"&lt;&lt;car_num[x]&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tCar Make or Brand:"&lt;&lt;car_brand[x]&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tCar Model:"&lt;&lt;car_model[x]&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tCar Colour:"&lt;&lt;car_colour[x]&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tYear of Manufacturing:"&lt;&lt;car_year[x]&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tEngine Capacity:"&lt;&lt;car_eng_cap[x]&lt;&lt;"cc"&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tTransmission:"&lt;&lt;car_tran[x]&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tCost of Car: RM"&lt;&lt;car_cost[x]&lt;&lt;endl;
                              }
                              else
                                  cout&lt;&lt;"No data is founded."&lt;&lt;endl;
                              break;
                          }
                      }
                  case 4: //Option 4
                      {
                          cout&lt;&lt;"Enter Car Price:"&lt;&lt;endl;
                          cin&gt;&gt;search_car;
                          for(int x=0 ; x&lt;cnt; x++)
                          {
                              if(search_car==car_cost[x])//Detecting which car price same as user input
                              {
                                  cout&lt;&lt;"\n\tCar Registration Number:"&lt;&lt;car_num[x]&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tCar Make or Brand:"&lt;&lt;car_brand[x]&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tCar Model:"&lt;&lt;car_model[x]&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tCar Colour:"&lt;&lt;car_colour[x]&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tYear of Manufacturing:"&lt;&lt;car_year[x]&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tEngine Capacity:"&lt;&lt;car_eng_cap[x]&lt;&lt;"cc"&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tTransmission:"&lt;&lt;car_tran[x]&lt;&lt;endl;
                                  cout&lt;&lt;"\n\tCost of Car: RM"&lt;&lt;car_cost[x]&lt;&lt;endl;
                              }
                              else
                                  cout&lt;&lt;"No data is founded."&lt;&lt;endl;
                              break;
                          }
                      }
                  case 5: //Option 5
                      {
                          cout&lt;&lt;"Operation Canceled."&lt;&lt;endl;
                          break;
                      }
  
                  }
                  }
                  case 5: //Option 5
                      all_inventory(car_num, car_brand, car_model, car_colour, car_year, car_eng_cap, car_tran, car_cost,cnt);
                      break;
                  case 6: //Option 6
                      {
                          cout&lt;&lt;"\n\nGOOD BYE!";
                          break;
                      }
                  default:cout&lt;&lt;"\a";
                      }
  cin.ignore();
  cin.get();
      }while(menu!=6);
      return 0;
  }
  </code></pre>
  
  <p>[Updated]</p>
  
  <pre><code>//Function Prototype (I put this between namespace and int main)
  
  void start_menu();
  void read_data_file(string a[], string b[], string c[], string d[], string e[], string f[], string g[], string h[]);
  void crt_acc(string car_num[],int cnt);
  void check_car_num(string car_num[], string &amp;car_num1, int cnt);
  void remove_account(string enter_acc_num, string car_num[], string car_brand[], string car_model[], string car_colour[], string car_year[], string car_eng_cap[], string car_train[], string car_cost[], int cnt);
  void edit_account(string enter_acc_num, string car_num[], string car_brand[], string car_model[], string car_colour[], string car_year[], string car_eng_cap[], string car_tran[], string car_cost[], int cnt);
  void all_inventory(string car_num[], string car_brand[], string car_model[], string car_colour[], string car_year[], string car_eng_cap[], string car_tran[], string car_cost[], int cnt);
  </code></pre>
  
  <p>[updated]</p>
  
  <pre><code>void crt_cc(string car_num[],int cnt) {
  
  //Declare Variables
  
  ofstream outfile;
  
  string car_num1, car_year ,car_eng_cap, car_cost, car_model, car_brand, car_colour;
  
  char car_tran;
  
  check_car_num(car_num, car_num1, cnt);//Pass to check car registration number function
  
  cout&lt;&lt;"\n\tEnter Car Make or Brand (Honda/Toyota/Proton/Perodua/Suzuki):";
  
  cin&gt;&gt;car_brand;
  
  cout&lt;&lt;"\n\tEnter Car Model :";
  
  cin&gt;&gt;car_model;
  
  cout&lt;&lt;"\n\tEnter Car Colour :";
  
  cout&lt;&lt;"\n\tEnter Year of Manufacturing :";
  
  cin&gt;&gt;car_year;
  
  cout&lt;&lt;"\n\tEnter Engine Capacity(in CC) :";
  
  cin&gt;&gt;car_eng_cap;
  
  cout&lt;&lt;"\n\tEnter Car Tranmission (Auto(A)/Manual(M)):";
  
  cin&gt;&gt;car_tran;
  
  car_tran=toupper(car_tran);
  
  cout&lt;&lt;"\n\tEnter Cost of the Car(RM) :";
  
  cin&gt;&gt;car_cost;
  
  cout&lt;&lt;endl;
  
  cout&lt;&lt;"\n\tA Car Account Has Been Created. "&lt;&lt;endl;
  
  cout&lt;&lt;"\n\tThe"&lt;&lt;car_brand&lt;&lt;car_model&lt;&lt;"has been created."&lt;&lt;endl;
  
  //Write the new account data into file
  
  outfile.open("caracc.txt",ios::app);
  
  outfile&lt;&lt;car_num1&lt;&lt;endl;
  
  outfile&lt;&lt;car_brand&lt;&lt;endl;
  
  outfile&lt;&lt;car_model&lt;&lt;endl;
  
  outfile&lt;&lt;car_colour&lt;&lt;endl;
  
  outfile&lt;&lt;car_year&lt;&lt;endl;
  
  outfile&lt;&lt;car_eng_cap&lt;&lt;endl;
  
  outfile&lt;&lt;car_tran&lt;&lt;endl;
  
  outfile&lt;&lt;car_cost&lt;&lt;endl;
  
  outfile.close();//Close file
  }
  </code></pre>