Atozed Forums

Full Version: gInternalFiles
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
Fixed it - gInternalFiles is (now ?) a function, gInternalFiles()-> does the trick.

Funny it didn't need that before.

Denville.
Thanks for letting us know that you solved it.
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.