Re: Function in header file - newbie VC++/CLI

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Code in above post works good.but in next post with header file don't work
Sorry for my english ;)

Uzytkownik "Tom Serface" <tom.nospam@xxxxxxxxxxxxx> napisal w wiadomosci
news:EE8299AA-33F6-4CE7-AEDA-8783739756F2@xxxxxxxxxxxxxxxx
Ah, and that doesn't work in any language.

Tom

"Duane Hebert" <spoo@xxxxxxxxx> wrote in message
news:uKS2l9ZvHHA.4796@xxxxxxxxxxxxxxxxxxxxxxx

"Tom Serface" <tom.nospam@xxxxxxxxxxxxx> wrote in message
news:3F0B759F-12BA-4FE9-9435-E719E470A4A2@xxxxxxxxxxxxxxxx
If you are showing all of the code, your problem is that your function
is not part of a class and, thus, wouldn't have a 'this' pointer. You
don't really need to expressly use the this pointer anyway since it is
implied where it can be used.

I don't think he's showing all of his code. I imagine that the
first part was in the header within the Form1 class since he says
that it compiled. It looks like he's trying to just strip
out the code and put it in an unrelated cpp file.

I didn't reply to him because with the
use of "String ^Message" I wasn't sure if the same rules
applied for VC++/CLI (or C# or whatever language this was in)
as C++.

Maybe he just wants to split the definition/declaration into
a h/cpp pair. Is that legal in c++/cli?





.



Relevant Pages

  • Pointers, DLL Header files and lots of exceptions?
    ... I have the C header file that I used Dr. Bob's ... append line to the memo box. ... I've spent many hours investigating this on-line and reading docs on pointer ...
    (comp.lang.pascal.delphi.misc)
  • Re: CByteBuffer implementation passed between modules
    ... header file, then it is compiled in the context of the caller, which is ... created an impossible situation, and there isn't a good answer for it. ... "In C++ it is quite natural to use the value NULL to indicate the pointer ... You don't have to test to see if a pointer is empty before you ...
    (microsoft.public.vc.mfc)
  • Re: Overloaded Constructors
    ... > just a pointer to an existing object. ... The reader of your header file should try to ignore implementation details ... > standard will make code easier to maintain down the road. ...
    (comp.lang.cpp)
  • Re: Way to autogenerate C/C++ Headers?
    ... even Intel does that in their interfaces. ... I have enhanced my wrapper generator and have looked at the ... In this case the header file does not give me _any_ clue ... as to the character of the void pointer. ...
    (comp.lang.fortran)
  • Re: Attributes for pointers in .ODL file
    ... > header file in the .ODL file. ... > like to know how to correctly specify attributes for memory addresses. ... pointer - this is obvious from the parameter's type. ... Marshaling layer has to do extra work to deal with aliasing issues, ...
    (microsoft.public.vc.language)