void open_key(HKEY* Key , HKEY key , LPCTSTR subkey)
	cout << Key[1] << endl;
	RegOpenKeyEx(Key[1] , subkey , 0 ,  KEY_ENUMERATE_SUB_KEYS | KEY_QUERY_VALUE  , &key);

int main()

open_key(&keys[1] , hkey , "Software");

how can i print Key[1] so that its show HKEY_CURRENT_USER ?
now it just prints: 0x80000002

Is that what HKEY_CURRENT_USER is defined to? I'm not going to check for you but I suspec that it is. You would need to provide some method of producing a textual representation of this defined value and printing that instead of the value itself.

I agree with matt, HKEY_CURRENT_USER is just a const value or enumerated type, so you would need something like a switch case statement to cout the textual representations

ok,if i dont need string representation,i just want to pass it to regopenkeyex(),how should i do it ? because is not working....:(