gInternalFiles

<< Click to Display Table of Contents >>

Navigation:  Forum >

gInternalFiles

Forum link

 


 

05-17-2021, 02:49 PM:

 

Hi, C++ Builder XE7, IW 15.0 22

 

I am maintaining an application built some years ago using IW14.  (I know my current IW is behind in updates but it serves me well and to update it unnecessarily is a nightmare of administration).  The app in question has the following line in ServerController.cpp:

 

gInternalFiles->Add( "IW_JS_JSENCRYPT", "/js/jsencrypt.js" );

 

Compilation fails at -> with error Pointer to structure required on left side of -> or ->*

 

I have checked the definition of gInternalFiles which is similar to the IW14 version and I am at a loss why compilation now fails.

 

Thanks,

 

Denville.

 


 

05-17-2021, 05:53 PM:

 

Fixed it - gInternalFiles is (now ?) a function, gInternalFiles()-> does the trick.

 

Funny it didn't need that before.

 

Denville.

 


 

05-17-2021, 06:08 PM:

 

Thanks for letting us know that you solved it.

 


 

05-19-2021, 01:16 AM:

 

Hi Denville,

 

Thanks for the feedback.

 

gInternalFiles used to be a variable and it became a function with the same name. As you may know, in Delphi you can omit the parenthesis of function calls if there are no parameters, so gInternalFiles alone works for both a variable referencing an object or a function returning an instance of the same object. The same is not true for C++, so you are correct.