Click here to Skip to main content
14,833,898 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C++ class question Pin
pkfox8-Dec-20 7:17
professionalpkfox8-Dec-20 7:17 
AnswerRe: C++ class question Pin
Mircea Neacsu8-Dec-20 7:29
mvaMircea Neacsu8-Dec-20 7:29 
QuestionRe: C++ class question Pin
David Crow8-Dec-20 7:06
MemberDavid Crow8-Dec-20 7:06 
AnswerRe: C++ class question Pin
pkfox8-Dec-20 7:16
professionalpkfox8-Dec-20 7:16 
SuggestionRe: C++ class question Pin
David Crow8-Dec-20 7:19
MemberDavid Crow8-Dec-20 7:19 
AnswerRe: C++ class question Pin
Joe Woodbury8-Dec-20 10:00
professionalJoe Woodbury8-Dec-20 10:00 
AnswerRe: C++ class question Pin
CPallini8-Dec-20 21:29
mveCPallini8-Dec-20 21:29 
GeneralRe: C++ class question Pin
pkfox9-Dec-20 3:19
professionalpkfox9-Dec-20 3:19 
Hi there, I don't think I'm explaining what is confusing me so I'll try again.

If I define a class object in a C# program I can instantiate it like so

Sample of the top of my head code
namespace Test
{
    public class Dummy
    {
        string Path {get;set;}
        Public Dummy(string Path)
        {
            this.Path = Path;
        }
    }

    class Program
    {
        Dummy dummy {get;set;}
        [STAThread]
        static void Main()
        {
            Program p = new Program();
            p.dummy = new Dummy("MyPath");
        }
    }
}

In C++ I can only create it like this if I make the dummy variable a pointer ( which is not a problem but I'd like to know how to do it the other way) I'm sure this must be doable. Thanks for everyones help so far.
"I didn't mention the bats - he'd see them soon enough" - Hunter S Thompson - RIP

GeneralRe: C++ class question Pin
CPallini9-Dec-20 7:28
mveCPallini9-Dec-20 7:28 
AnswerRe: C++ class question Pin
Daniel Pfeffer9-Dec-20 1:19
professionalDaniel Pfeffer9-Dec-20 1:19 
AnswerRe: C++ class question Pin
Richard MacCutchan9-Dec-20 3:43
mveRichard MacCutchan9-Dec-20 3:43 
GeneralRe: C++ class question Pin
pkfox9-Dec-20 4:53
professionalpkfox9-Dec-20 4:53 
GeneralRe: C++ class question Pin
Richard MacCutchan9-Dec-20 5:42
mveRichard MacCutchan9-Dec-20 5:42 
GeneralRe: C++ class question Pin
pkfox9-Dec-20 6:05
professionalpkfox9-Dec-20 6:05 
GeneralRe: C++ class question Pin
Richard MacCutchan9-Dec-20 6:10
mveRichard MacCutchan9-Dec-20 6:10 
GeneralRe: C++ class question Pin
pkfox9-Dec-20 11:02
professionalpkfox9-Dec-20 11:02 
QuestionDROPEFFECT_NONE does not work in conjunction with CF_HDROP Pin
Member 119022653-Dec-20 7:42
MemberMember 119022653-Dec-20 7:42 
QuestionRe: DROPEFFECT_NONE does not work in conjunction with CF_HDROP Pin
David Crow4-Dec-20 7:04
MemberDavid Crow4-Dec-20 7:04 
AnswerRe: DROPEFFECT_NONE does not work in conjunction with CF_HDROP Pin
Member 119022656-Dec-20 12:48
MemberMember 119022656-Dec-20 12:48 
QuestionNetserverenum function return false detail Pin
Member 141178532-Dec-20 23:43
MemberMember 141178532-Dec-20 23:43 
AnswerRe: Netserverenum function return false detail Pin
Richard MacCutchan3-Dec-20 0:06
mveRichard MacCutchan3-Dec-20 0:06 
GeneralRe: Netserverenum function return false detail Pin
Member 141178533-Dec-20 20:38
MemberMember 141178533-Dec-20 20:38 
GeneralRe: Netserverenum function return false detail Pin
Victor Nijegorodov3-Dec-20 20:42
MemberVictor Nijegorodov3-Dec-20 20:42 
GeneralRe: Netserverenum function return false detail Pin
Member 141178533-Dec-20 21:42
MemberMember 141178533-Dec-20 21:42 
GeneralRe: Netserverenum function return false detail Pin
Richard MacCutchan3-Dec-20 22:48
mveRichard MacCutchan3-Dec-20 22:48 

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.