Click here to Skip to main content
14,768,075 members
Home » Discussions » C / C++ / MFC
   

C / C++ / MFC

 
SuggestionRe: cmath.h compile error Pin
David Crow10-Dec-20 3:13
MemberDavid Crow10-Dec-20 3:13 
AnswerRe: cmath.h compile error Pin
Randor 10-Dec-20 3:46
professional Randor 10-Dec-20 3:46 
QuestionRe: cmath.h compile error Pin
Richard MacCutchan10-Dec-20 4:21
mveRichard MacCutchan10-Dec-20 4:21 
AnswerRe: cmath.h compile error Pin
Daniel Pfeffer10-Dec-20 4:53
professionalDaniel Pfeffer10-Dec-20 4:53 
AnswerRe: cmath.h compile error Problem solved Pin
Haakon S.11-Dec-20 5:07
MemberHaakon S.11-Dec-20 5:07 
GeneralRe: cmath.h compile error Problem solved Pin
Randor 11-Dec-20 9:04
professional Randor 11-Dec-20 9:04 
GeneralRe: cmath.h compile error Problem solved Pin
Haakon S.12-Dec-20 0:56
MemberHaakon S.12-Dec-20 0:56 
QuestionC++ class question Pin
pkfox8-Dec-20 7:40
professionalpkfox8-Dec-20 7:40 
Ok C++ is not mt my main language so please bear with me.

For my question I will use this class
class BillingDates
{
public:
    BillingDates(std::string InputFile);
    void ProcessDates();
    rapidjson::Document doc;
    std::string InputFile;
    std::string YearStartDate;
    std::string YearEndDate;
    std::string BBFDate;
    std::string BillIssueDate;
    std::string BillIssueDateLong;
    int CurrentFinancialYear = 0;
    std::ifstream InputStream;
};

And in my main program I declare a pointer and an object to the class thus
BillingData *bData;
BillingData bData2;

I can then create my pointer so
bData = new BillingDates("path to my file");
how can I create an instance for bData2 ?
I know I can do it like this
BillingData bData2("path to my file");
but that will create a new var and not use my previously declared var.
Hope this makes sense
"I didn't mention the bats - he'd see them soon enough" - Hunter S Thompson - RIP

AnswerRe: C++ class question Pin
Mircea Neacsu8-Dec-20 7:51
mvaMircea Neacsu8-Dec-20 7:51 
GeneralRe: C++ class question Pin
pkfox8-Dec-20 8:17
professionalpkfox8-Dec-20 8:17 
AnswerRe: C++ class question Pin
Mircea Neacsu8-Dec-20 8:29
mvaMircea Neacsu8-Dec-20 8:29 
QuestionRe: C++ class question Pin
David Crow8-Dec-20 8:06
MemberDavid Crow8-Dec-20 8:06 
AnswerRe: C++ class question Pin
pkfox8-Dec-20 8:16
professionalpkfox8-Dec-20 8:16 
SuggestionRe: C++ class question Pin
David Crow8-Dec-20 8:19
MemberDavid Crow8-Dec-20 8:19 
AnswerRe: C++ class question Pin
Joe Woodbury8-Dec-20 11:00
professionalJoe Woodbury8-Dec-20 11:00 
AnswerRe: C++ class question Pin
CPallini8-Dec-20 22:29
mveCPallini8-Dec-20 22:29 
GeneralRe: C++ class question Pin
pkfox9-Dec-20 4:19
professionalpkfox9-Dec-20 4:19 
GeneralRe: C++ class question Pin
CPallini9-Dec-20 8:28
mveCPallini9-Dec-20 8:28 
AnswerRe: C++ class question Pin
Daniel Pfeffer9-Dec-20 2:19
professionalDaniel Pfeffer9-Dec-20 2:19 
AnswerRe: C++ class question Pin
Richard MacCutchan9-Dec-20 4:43
mveRichard MacCutchan9-Dec-20 4:43 
GeneralRe: C++ class question Pin
pkfox9-Dec-20 5:53
professionalpkfox9-Dec-20 5:53 
GeneralRe: C++ class question Pin
Richard MacCutchan9-Dec-20 6:42
mveRichard MacCutchan9-Dec-20 6:42 
GeneralRe: C++ class question Pin
pkfox9-Dec-20 7:05
professionalpkfox9-Dec-20 7:05 
GeneralRe: C++ class question Pin
Richard MacCutchan9-Dec-20 7:10
mveRichard MacCutchan9-Dec-20 7:10 
GeneralRe: C++ class question Pin
pkfox9-Dec-20 12:02
professionalpkfox9-Dec-20 12:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.