[Help]About LPCVOID

This is a discussion on [Help]About LPCVOID within the C++ Programming forums, part of the General Programming Boards category; How can I leave the user to input a value for this variable: LPCVOID Address1; If declare the value when ...

  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    4

    [Help]About LPCVOID

    How can I leave the user to input a value for this variable:

    LPCVOID Address1;

    If declare the value when I compile everything works fine, like this:

    LPCVOID Address1= (LPCVOID)0x1F63AEBC;

    But the problem is that this value changes and I need to recompile everytime I finish my application, so how can I use cin, scanf or something similar to get the value input from user?

    Thanks ^^

  2. #2
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    1,625
    Code:
    DWORD value;
    
    cin >> std::hex >> value;
    
    LPCVOID Address1= (LPCVOID)(value);
    Or anything similar to that.
    Devoted my life to programming...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. string to LPCVOID
    By koyboy in forum Windows Programming
    Replies: 12
    Last Post: 05-24-2008, 11:31 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21