|
Also, check out CComPtr::CoCreateInstance (or was it CreateInstance only?)
--
Please state the nature of your medical emergency.
|
|
|
|
|
it is CoCreateInstance . CreateInstance is with _com_ptr_t .
Michel
It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard
|
|
|
|
|
|
That does look cool.
Have you used it?
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Not yet. I browsed through the documentation and found that it's excellent in theory.
What's really excellent is that you don't need a separate tool like yacc or bison - you just need C++/STL! And the quality seems very high. It's being submitted to the boost library/committers so it has to be high quality.
They're also working on a strict LL(1) parser (more efficient in terms of speed and memory) for every day grammars. What's lovely with LL(k) is that it can take on complex grammars like that of C++.
Also, if I understood the docs correctly, it also has support for symbol management with complete scoping! They even claim that they'll implement the different scoping rules found in C++ - including König lookup.
If I need to write a parser/compiler again, I'll sure try this library. It looks very promising.
--
Please state the nature of your medical emergency.
|
|
|
|
|
from the page:
... The Spirit framework enables a target grammar to be written exclusively in C++. Inline EBNF grammar specifications can mix freely with other C++ code and, thanks to the generative power of C++ templates, are immediately executable. In retrospect, conventional compiler-compilers or parser-generators have to perform an additional translation step from the source EBNF code to C or C++ code. ...
WOW !!!!! Writing the grammars in C++ !!! Inline EBNF grammar specifications mixed freely with other C++ code !!!!!!!!!
Using C++,STL and template metaprogramming !!!!!!!!
Now , when I have the time I'll test it, but it appears that it ROCKS !!!
Thanks a lot for the link !!! Added instantly to my Favourites
p.s: I didn't have compilers in college , but I studied myself a bit
Cheers,Joao Vaz
And if your dream is to care for your family, to put food on the table, to provide them with an education and a good home, then maybe suffering through an endless, pointless, boring job will seem to have purpose. And you will realize how even a rock can change the world, simply by remaining obstinately stationary.-Shog9
|
|
|
|
|
Great ain't it?
Joao Vaz wrote:
p.s: I didn't have compilers in college , but I studied myself a bit
Compiler construction was the single best course I ever took at the university. I learnt a lot of good things in that course - everything from lexical scanning, parsing, symbol management, code generation/virtual machine-basics and some optimization. If your local university ever offers such a course - don't blink! Apply for it right away, you won't regret it.
Our lab assignment was to write a compiler for a simplified version of Pascal. The compiler then generated output in a three address code. This 3ac should then be executed in a virtual machine. Best lab assignment I ever had. I miss school sometimes.
--
Please state the nature of your medical emergency.
|
|
|
|
|
Jörgen Sigvardsson wrote:
Compiler construction was the single best course I ever took at the university. I learnt a lot of good things in that course - everything from lexical scanning, parsing, symbol management, code generation/virtual machine-basics and some optimization.
Cool course .
Jörgen Sigvardsson wrote:
Our lab assignment was to write a compiler for a simplified version of Pascal. The compiler then generated output in a three address code. This 3ac should then be executed in a virtual machine. Best lab assignment I ever had.
Even cooler.
Jörgen Sigvardsson wrote:
I miss school sometimes.
Me too, but at the time I hated it
Now I always thinking in taking a masters degree and do research ...
Cheers,Joao Vaz
And if your dream is to care for your family, to put food on the table, to provide them with an education and a good home, then maybe suffering through an endless, pointless, boring job will seem to have purpose. And you will realize how even a rock can change the world, simply by remaining obstinately stationary.-Shog9
|
|
|
|
|
Jörgen Sigvardsson wrote:
Compiler construction was the single best course I ever took at the university. I learnt a lot of good things in that course - everything from lexical scanning, parsing, symbol management, code generation/virtual machine-basics and some optimization. If your local university ever offers such a course - don't blink! Apply for it right away, you won't regret it.
I had two courses like that last year. Those were the most difficult courses in college and not all students take it.
Jörgen Sigvardsson wrote:
Our lab assignment was to write a compiler for a simplified version of Pascal. The compiler then generated output in a three address code. This 3ac should then be executed in a virtual machine. Best lab assignment I ever had. I miss school sometimes
Similar assignement here also!
Best regards,
Alexandru Savescu
|
|
|
|
|
Alexpro wrote:
Those were the most difficult courses in college and not all students take it.
Challenges inspire!
The single most difficult course I took was "Distributed Systems". And now we're talking truly distributed systems - not simple client/server-systems. It really starts freaking out when you take causality into account - it feels all of a sudden like a bad mix between Star Trek and theory of relativity. All of a sudden you're in this time-quantified universe where you cannot always be sure if one event occured before another. Not having a common clock make things very complicated!
--
Please state the nature of your medical emergency.
|
|
|
|
|
Jörgen Sigvardsson wrote:
The single most difficult course I took was "Distributed Systems".
I am studying this course this semester!
The first lab describes the Synchronizing Resources Language (the home page can be found here).
Best regards,
Alexandru Savescu
|
|
|
|
|
I'm doing a COM/ATL dll and I want to add XP themes to it. I did the manifest thigny but it does not seem to work...
any hints?
Thanks guys!
---------------
Concentrating on Ideas
http://www.edovia.com
|
|
|
|
|
From what I've read, .dll must have the RT_MANIFEST resource defined as 2 for libraries, instead of 1 for applications. See if that works.
"Well, I wouldn't say I've been missing it, Bob." - Peter Gibbons
|
|
|
|
|
Didn't work for me... do you have some documentation about how to do it?
Thanks!
---------------
Concentrating on Ideas
http://www.edovia.com
|
|
|
|
|
All the documentation is available in MSDN[^]. That would be a good place to look.
"Well, I wouldn't say I've been missing it, Bob." - Peter Gibbons
|
|
|
|
|
Dudes,
I had a small MFC app based on propertysheet and pages that I am porting to WTL. All is well except I never get the WM_INITDIALOG message for the propertysheet. Any clue?
|
|
|
|
|
The property sheet template does not process the WM_INITDIALOG message. You'll need to create your own Init routine and call it after the sheet is created.
|
|
|
|
|
Can somebody help me eliminate the following error. I get this error when I compile for Release and not for debug.
--------------------Configuration: esContaX - Win32 Release--------------------
Linking...
LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Release/esContaX.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
esContaX.exe - 2 error(s), 0 warning(s)
I Know this error is related to that the function _main is somehow unrichable. But why could this happen only in release mode.
|
|
|
|
|
Try changing the C/C++ run-time you link with : VC++ / C++ / CodeGeneration / (single threaded(libc) | multithreadedstatic(libcmd) | multithreadeddll(msvcrt)).
She's so dirty, she threw a boomerang and it wouldn't even come back.
|
|
|
|
|
Can you please tell me how do I do that.
Thank you
|
|
|
|
|
My post was detailing the actual tab and combobox in the Project settings.
She's so dirty, she threw a boomerang and it wouldn't even come back.
|
|
|
|
|
|
remove the _ATL_MIN_CRT preprocessor directive from your project settings (in Release build).
Michel
It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard
|
|
|
|
|
consider the following code snip of code
#include <map>
using namespace std;
typedef map<float,float> XY_DATA;
XY_DATA m_mapLines;
..
..
for(int i=0;i<100;i++)
m_mapLines[i]=i;
well the following assignment for the map is done
and a relative increase in memory consumed is observed.
OK
now for my problem
when i try to release the memory allocated using
m_mapLines.empty()
or
clear()
eventhough when i try map.size() i get zero.
there is no memory reduction in the taskmamager
what should i do to reduce the memory consumed by the map after emptying all its contents???
|
|
|
|
|
First of all, you are only dealing with a very small amount of memory in the example code that you have shown. 100 integers or 400 bytes plus whatever the map requires internally to manage the state of the data. This is much less than the amount of memory required in one virtual page of memory that is probably between 4 - 16 KB on your machine.
The memory manager often will allocate a new page and cache the excess memory in order to make newer requests more efficient later. So even though you have cleared out your map, the memory manager is still going to hold on to the memory.
There is really nothing that you can or need to do. What you are seeing is not a problem.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|