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




"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

  • Re: "Mastering C Pointers"....
    ... A pointer is a kind of variable that can "point to" some object. ... has a type (pointer to int), and a value of some kind. ... You may know that you can access these integers by using array notation ... The function will take one argument, a string, and will return the length ...
    (comp.lang.c)
  • Re: pesky Pointers !!
    ... > and the function takes it as a reference instead of a copy. ... function may access the string passed directly, ... > *px dereferences the pointer to get the value ... If pTest is a pointer-to-string, *pTest is the string it points to ...
    (alt.comp.lang.learn.c-cpp)
  • Re: strtok ( ) help
    ... > splitCommandssomehow modifying the pointer, but I HAVE to call that ... Here's an idea of how to use the strtok() function. ... don't mind trashing the contents of a string s, ... will give you a loop that extracts the tokens one at a time from s. ...
    (comp.lang.c)
  • Re: new IL: C (sort of...).
    ... C doesn't need a string type... ... variant of PL/1 which was very Pascal-ish. ... - C does implement an array declaration. ... effectively converted into a pointer that can be used with the offset ...
    (comp.lang.misc)
  • Re: Increasing efficiency in C
    ... > You don't know where the pointer will end pointing to. ... > representation of a C string. ... Wow Dan, ... My whole point is that data structure development should ...
    (comp.lang.c)

Loading