Let_Me_Be wrote:
>>Are you sure you don't want comp.lang.c++?
>
> Nope, this was just an example, my toolkit should work in both c/c++.
Speaking for myself, I found the examples did not cast
much light on your intentions. What are you trying to do?
The first question was
> 1) Is it possible to move from something like this: SAFECALL(foo()
> to
> __safecall foo();
.... and it's not at all clear how "like" the actual "something"
would be, nor what sort of "motion" you desire. The second was
> 2) I need to auto-add code to every method of particular class
.... and I'm unable to imagine how this could have any "image" in
C. All C functions (taking "function" as a translation of "method")
have the same status, as it were: they do not belong to any larger
groupings like "class" or "package," so I can see no way to decide
which functions require manipulation and which should be left alone.
This part of your toolkit needs more explanation -- or, as Vladimir
suggests, you need to take your question elsewhere.
The third example (see up-thread) looks like gibberish. You're
evidently trying to introduce some sort of assertion or error-check,
but you're doing so with a syntax that doesn't look anything at all
like C. Again, either your question needs elaboration or it needs
relocation.
One of the most valuable skills a programmer can hone is the
ability to ask good questions, questions that provide the necessary
information and state clearly what is wanted. You'll forgive me,
I hope, my opinion that you need practice in this skill.
--
Eric Sosman
lid