Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8951143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:35:40+00:00 2026-06-15T13:35:40+00:00

I am using Qt Creator version 5.0.0 beta to write my code, with MSVC2010

  • 0

I am using Qt Creator version 5.0.0 beta to write my code, with MSVC2010 with SP1 and all updates applied to compile.

I am creating a vector of objects that I have defined to store meta information about the jobs at my surveying firm.

I am storing the following information in this structure with variable type then variable name;

#pragma once
#ifndef JOB_H
#define JOB_H

#include "surveyman.h"
#include "client.h"
#include "contact.h"
#include "job.h"
#include "legallocation.h"
#include "location.h"
#include <string>
#include <time.h>
#include <QDate>

using namespace std;

class job
{
public:
    job();
job(int newUI, int newJobNumber, string newAddendum, string newJobType,
    string newDevelopmentName, QDate newDateReceived, string newNotes,
    legalLocation newJobLocation, client newCustomer, int newTotalMoneyPaid)
;
static int uniqueIdentifier;
    int jobNumber;
private:
    int UI;

    string addendum;
    string jobType;
    string developmentName;
    QDate dateReceived;
    string notes;
    legalLocation jobLocation;
    client customer;
    int totalMoneyPaid;
};

#endif // JOB_H


#pragma once
#ifndef LOCATION_H
#define LOCATION_H

#include <string>

using namespace std;

class location
{
public:
    location();
    location(string, string, string, string, string, int, string, string, string);
    string getAddressLine1();
    void setAddressLine1(string);
    string getAddressLine2();
    void setAddressLine2(string);
    string getAddressLine3();
    void setAddressLine3(string);
    string getAddressLine4();
    void setAddressLine4(string);
    string getLocality();
    void setLocality(string);
    string getStreet2();
    void setStreet2(string);
    string getAdditionalStreets();
    void setAdditionalStreets(string);
    string getAdditionalLocalities();
    void setAdditionalLocalities(string);
    int getUI();
    int getPostCode();
    void setPostCode(int);
    string toString();
    string getProvince(int);
    static int uniqueIdentifier;
private:
    int UI;
    string addressLine1;
    string addressLine2;
    string addressLine3;
    string addressLine4;
    string locality;
    int postCode;
    string street2;
    string additionalStreets;
    string additionalLocalities;

};

#endif // LOCATION_H




#pragma once
#ifndef LEGALLOCATION_H
#define LEGALLOCATION_H

#include "location.h"
#include <string>
#include <vector>

using namespace std;

class legalLocation : public location
{
public:
    legalLocation();
    legalLocation(location basicLocoation, vector<vector<int> > folios);
    legalLocation(string, string, string, string, string, int, string,
                  string, string, vector<vector<string> >);
    vector<vector<string> > getFolios();
private:
    vector<vector<string> > folios;

};

#endif // LEGALLOCATION_H




#pragma once
#ifndef CLIENT_H
#define CLIENT_H

#include "location.h"
#include "legallocation.h"
#include <string>
#include "contact.h"

using namespace std;

class client
{
public:
    client();
    client(string, string, string, string, string, location, vector<contact>);
    client(int, string, string, string, string, string, location, vector<contact>);
    static int uniqueIdentifier;
private:
    int UI;
    string lastName;
    string firstName;
    string phone;
    string fax;
    string emailAddress;
    location address;
    vector<contact> contacts;

};

#endif // CLIENT_H



#pragma once
#ifndef CONTACT_H
#define CONTACT_H

#include <string>
using namespace std;

class contact
{
public:
    contact();
    contact(string, string, string, string);
    static int uniqueIdentifier;
private:
    int UI;
    string firstName;
    string lastName;
    string phone;
    string emailAddress;

};

#endif // CONTACT_H

When I import the jobs, which takes a lot of code to get the information from one quite unstructured format, into this format I have noted three things about using vector.push_back(temporaryJob) [actual code is jobsDatabase.push_back(tempJob);]

When it reaches 5395 jobs added to the vector the program stops working and gives the standard microsoft “program has stopped responding” window.

When I create a second vector object and add to it once the first vector has 5000 objects stored in it the second vector object reaches a size of 711 before the same error occurs.

When using the same code for the two vector objects and upping the limit to 5350 the second file reaches 474 before the warning appears.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:35:41+00:00Added an answer on June 15, 2026 at 1:35 pm

    There might be several problems at the same time :

    • copying job classes. I do not know how you do it, but if you create another thread, then you have a bug. That might cause your OS to run out of resources. This can happen when the vector gets full (exceeds the reserved space)
    • running out of memory. You simply try to reserve too much memory then your system has. Again, this can happen if vector needs to be resized to a size greater then what is reserved
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Qt Creator 2.4.1 (Windows/mingw), I'm trying to compile my project dynamically linking with
I have created a QDialog based app using Qt Creator and all is well
I am using ubuntu 12.04 and Qt Creator 2.4.1. It builds my C code
I am trying to compile PythonQt using Qt creator but it return me 163
I need to compile my Qt project using a static version of the Qt
I'm trying to write metadata to a pdf file using the following python code:
I'm using Qt creator 2.4. I need to use a string say hiworld in
I'm using Qt Creator 4.5 with GCC 4.3 and I'm having the following problem
I am using DynamicPDF creator, Visual Studio 2010, and IIS 7. On my local
I'm using Qt Creator 2.4.1 under Xubuntu 11.10. I've installed libgdcm2-dev (2.0.17) in repositories.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.