Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Confused
Index -> Programming, C++ -> C++ Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Geminias




PostPosted: Wed Nov 16, 2005 11:00 pm   Post subject: Confused

this program writes the key to the registry but fails to write the value.



c++:

#include <iostream>


int main ()
{

system("reg import test.reg");

return 0;
}



"Test.reg"
Code:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\test]
"test"="Hello"




Can someone please enlighten me as to of why it would instantiate a key but no value? Thanks in advance.
Sponsor
Sponsor
Sponsor
sponsor
md




PostPosted: Thu Nov 17, 2005 3:11 am   Post subject: (No subject)

if you're going to use the registry I recommend learning the proper interface instead of using a system hack. I can't think of an exact link right now, but I'm sure a quick google, or search of msdn will help.
[Gandalf]




PostPosted: Thu Nov 17, 2005 3:56 pm   Post subject: (No subject)

I am fairly sure the more modern way of setting values in this way is to use and .ini file instead of the registry, and it might be easier too.
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: