Subj : Re: I have problem with the string precompiller To : borland.public.cpp.borlandcpp From : "Oldrin Maduro" Date : Tue Jul 15 2003 01:06 pm "Oldrin Maduro" wrote in message news:3f13eed2@newsgroups.borland.com... > When I run the program in Borland c++ it runs ok. However, if I had to > build an executable for the same program, then it doesn't run, as it > should be. > The warning that I get when run the program is as follows: > "string.cc (658,22) : Cannot create pre-compiled header: code in > header" > I am using strings and I have defined #include . > If anyone knows the solution for my problem, I would appreciate to > hear it from you.Oldrin > > I have disable the pre-compiled header in the settings, the warning did disappear but whenever you run the program outside borland environment it will not go through all the lines in the program. However if you run the same program in borland environment it will run perfectly. Hear is a piece of the code, Thank you, Oldrin. #include #include #include #include void task_one ( string A1[], int &k); void task_two (string B1[], int &z); void task_admin (const char *admin); void task_write (string C1[], int a); int main() { cout << "**************** Mail server update program ***************\n"<>cchoice; switch (cchoice) { case 0: cout << "You have made a wrong choice \n"; break; case 1: cout << "Your choice is "<< cchoice<> wait; return 0; } void task_one (string A1[], int &k ) { const char *chk_key="\\Software\\Microsoft\\Internet Account Manager\\Accounts\\" ; const char *test_key= "\\Identities\\"; char lszValue[100]; string S1[20]; string A2[20]; string task[20]; LONG lRet, lEnumRet; char szKey[1024]; HKEY hKey; DWORD dwLength=100; int i=0; int wait; int j=0; strcpy(szKey, chk_key); lRet = RegOpenKeyEx (HKEY_CURRENT_USER, chk_key , 0L, KEY_READ , &hKey); //open key to see how many accounts if(lRet == ERROR_SUCCESS) //are configured { lEnumRet = RegEnumKey (hKey, i,lszValue,dwLength); while(lEnumRet == ERROR_SUCCESS) { i++; //printf ("%s\n",lszValue); S1[i] = lszValue; lEnumRet = RegEnumKey (hKey, i,lszValue,dwLength); } } for ( j=1; j <= i; j++) { A1[j] = chk_key+S1[j]; // printf ("%s\n",A1[j]); } k=i; cout << "Task one succesfully executed \n"; return; } .