CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Value Property

  1. #1
    Join Date
    May 2010
    Posts
    2

    Lightbulb Value Property

    Hi, I have a little project set up that handles a bunch of numbers. It's a mathematical utility program, and the pseudo-code formula looks like this:

    x = (f*a - d*c) / (d*b - e*a);

    I expected it to be pretty simple.
    You know, the familiar x->Value = a->Value, etc. But the code

    x2->Value = ( (f->Value)*(a->Value) - (d->Value)*(c->Value) ) / ( (d->Value)*(b->Value) - (e->Value)*(a->Value) );

    returns the Build Error

    'Value' : is not a member of 'System::EventArgs'.

    I've tested individual code snippets, and I think the problem lies in the second part, after the division.

  2. #2
    Join Date
    May 2010
    Posts
    2

    Re: Value Property

    Aha! The compiler apparently was trying to treat "e" as scientific notation. I simply renamed the object the obscure "e_number" and all is golden!

  3. #3
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: Value Property

    Your code is manage C++, not native C++. Try asking your question here.

  4. #4
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: Value Property

    [ redirected ]
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

  5. #5
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: Value Property

    Looks like this code is part of an event handler, that has two arguments, a sender and event arguments, which usually is a variable called e. Probably you also have a variable called e, or assume one, and there is the problem.
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured