|
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!
|
|
|
|
|
You could try the swap trick
XY_DATA().swap(m_mapLines);
I think that's the correct syntax.
Todd Smith
|
|
|
|
|
Hi,
One problem solved another problem appears. THis time i encountered a problem that has no good explantion for it. I got an error when trying to open a connection to the ADO. The code that i have written is:
Code
try
{
//THROW_ERR( CoInitialize(NULL) );
THROW_ERR( CoCreateInstance(CLSID_CADOConnection, NULL, CLSCTX_INPROC_SERVER, IID_IADOConnection, (LPVOID*)&m_pConnection) );
THROW_ERR( m_pConnection->Open(m_bsDataSource, m_bsUserName, m_bsPassword, adOpenUnspecified) );
}
catch (HRESULT hr)
{
PopupErrorMessage(hr);
return FALSE;
}
I tried out the code in the debug mode and it stopped at the line where it calls the 'Open' function.
The error message is:
Program:C:\temp\project\project.exe
Module:
File:i386\chkesp.c
Line: 42
The Value of the ESP was not properly saved across function call. This us usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
I have included the 'adoid.h' and 'adoint.h' in the 'stdafx.h' file. I even included the 'adoid.lib' in my project setting. What is the root cause of this problem and how to solve it??
Need your help..
thanks in advance.
leonwoo
|
|
|
|
|
Hi,
I am a newbie in ATL and have a question that hope you can answer it. The question is that I am trying to convert a BSTR type variable into a LPCTSTR type. I used the _com_util to do it but when i compiled the program, errors appear. I created the ATL project using the ATL wizard and the error message i received was
--------------------------------------------------------------------------
The original source code:
STDMETHODIMP CIniLoader::GetPrivateProfileString(BSTR bsSection, BSTR bsEntry, BSTR *bsOutput)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState())
LPCTSTR lpSection = _com_util::ConvertBSTRToString(bsSection);
return S_OK;
}
The Error message
{C:\temp\Project\PlatformManager\IniLoader.cpp(45) : error C2653: '_com_util' : is not a class or namespace name
C:\temp\Project\PlatformManager\IniLoader.cpp(45) : error C2065: 'ConvertBSTRToString' : undeclared identifier}
----------------------------------------------------------------------
I tried to include the header file 'comutil.h' into the project and added an extra line 'using namespace _com_util' into the implementation but another different errors appeared.
--------------------------------------------------------------------------
Creating library Debug/PlatformManager.lib and object Debug/PlatformManager.exp
IniLoader.obj : error LNK2001: unresolved external symbol "char * __stdcall _com_util::ConvertBSTRToString(unsigned short *)" (?ConvertBSTRToString@_com_util@@YGPADPAG@Z)
Debug/PlatformManager.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
I have no idea which portion of the code went wrong...please help...
thanks in advance.
leonwoo
|
|
|
|
|
leonwoo wrote:
IniLoader.obj : error LNK2001: unresolved external symbol "char * __stdcall _com_util::ConvertBSTRToString(unsigned short *)" (?ConvertBSTRToString@_com_util@@YGPADPAG@Z)
Are you possibly passing it the string literal where it may need a pointer to it?
Have you looked at this MSDN page[^]
Nick Parker
The goal of Computer Science is to build something that will last at least until we've finished building it. - Unknown
|
|
|
|
|
thanks for the link Nick. I have doubt in what this line is doing. Can you explain it. thanks.
#pragma comment(lib, "comsupp.lib")
leonwoo
|
|
|
|
|
leonwoo wrote:
I have doubt in what this line is doing. Can you explain it.
It is telling the compiler to search the comsupp.lib while linking.
Nick Parker
The goal of Computer Science is to build something that will last at least until we've finished building it. - Unknown
|
|
|
|