Victor Bazarov said:
There is no question in Tom's two sentences. Unless yours was
a trick question...
It seems fairly obvious that the original question was a homework
assignment in which case there's always the possibility that the
instructor gave a "trick question", i.e., one with a deliberately
false premise.
More likely, though, the instructor actually believes there is
such an inherent confict between efficiency and portability.
The instructor is probably thinking of cross-platform libraries
vs. platform-specific APIs, but this is (1) outside the scope
of standard C++, (2) not an issue for all applications, (3) not
necessarily true even in this more limited context (i.e.,
"high level" != "inefficient"), and (4) probably bad advice for
most programmers (i.e., premature optimization).
My advice to the original poster is this. If you want to please
your instructor, review your notes (or someone else's if you
haven't been attending class -- shame one you!), and parrot
whatever half-truths your instructor has passed off on you.
On the other hand, if you want to actually learn, then don't
just ask for a quick answer. Try to answer it yourself. Look for
gaps in your understanding (e.g., "what does portability mean?")
then read and/or search the internet to find answers. Ask probing
questions of yourself. Read the FAQs for relevant newsgroups.
(Note the plural. Just because you're programming in C++ doesn't
make every question a C++ question.) If you do all that and still
can't figure something out, post a specific question to an
appropriate newsgroup.