Re: Why does a client code need to be recompiled also?

Tech-Archive recommends: Fix windows errors by optimizing your registry



<beginwithl@xxxxxxxxx> wrote in message
news:5c2c7230-365d-483a-a37d-9f2b50290835@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

BTW - I hope I'm not breaking any rules by putting three questions
inside a single thread, but I don?t want to "spam" this forum with
even more threads

Although you may be accessing this via a Web interface, this is NOT a Web
forum. It is a USENET newsgroup, and therefore many of the "rules" you have
learned in Web forums do not apply here. For example, there is no stigma
against "double posting," although multiple posts on the same topic should
be kept in the same thread.

On the subject of threads: you have actually created three threads, not a
single thread as you believed. In a newsgroup, it is basically the subject
of the post that creates a thread (this is not REALLY the case, but it is
FUNCTIONALLY true). Creating three threads is a good thing when they all
have different topics.

As for your questions, I can really only answer one of them:

1) From the book:

?A field initializer is part of the field declaration, and consists of
an equals sign followed by an expression that evaluates to a value.
The initialization value must be determinable at compile time.?

But if initialization value must indeed be determinable at compile
time, then the following code would produce an error, due to the fact
that here the initialization value can?t be known at compile time,
since memory on the heap is only allocated at run-time:

class A
{
B b = new B(); // here value of b can't be known until run time
}

You're wrong in your assumption that the "value of b can't be known until
run time." In fact, I'm not even sure what you're saying. At run time, b
will be initialized as a new instance of class B. In other words, the
statement above will compile and execute perfectly.


.



Relevant Pages

  • problem on pf @ freebsd 7.0
    ... sorry if this similar question been asked before in this forum. ... i install freebsd 7.0 and after that compile the kernel to ...
    (freebsd-questions)
  • Basic questions on linking static and dynamic libraries
    ... I hope this is not too basic for this forum. ... Two questions I couldn't really find an answer to in the books I have. ... - There don't seem to be any environment variable holding library paths on ... If I type "env" in bash (same user as I compile with), ...
    (comp.os.linux.development.system)
  • CW8, SDK 10.2.8 and Panther Functions?
    ... With the kind help of this forum I managed to compile a Carbon project ... with CW 8.3 under Tiger. ...
    (comp.sys.mac.programmer.codewarrior)
  • Re: Mac advice please
    ... are almost universally pro-Mac - now go to a Windows or multi-platform ... based forum and ask the same thing. ... Compile all the inevitable reasons ...
    (uk.comp.sys.mac)