|
Thanks for your feedback!
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
how to use semaphores to acheive synchronization..please let me know
kir_MFC
|
|
|
|
|
PLease refer Jeffery Richer or MSDN to get more info about semaphore.
|
|
|
|
|
See, for instance [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
http://www.informit.com/library/content.aspx?b=Visual_C_PlusPlus&seqNum=149
|
|
|
|
|
Hi to all,
I have this doubt,please clear me....
I saw a statement in one program
#define ___allocCon(x,y) new x y;
could anyone please tell me what does this means....I am confused with 2 parameters with new (x and y)...I have never seen this...
Please help me out.
Thanks in advance
HimangshuS
-----------------------------
I am a beginner
|
|
|
|
|
try to see where ___allocCon is used in that program.
you may get some clue.
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
they have used like this
ACE_Message_Block * pMsg = ___allocCon(ACE_Message_Block,(sizeof(void*),xxx ));
ACE_Message_Block is a message block data types for ace framework....and xxx is define as
#define yyy 8000
#define xxx (yyy +1)
please give some light on it
-----------------------------
I am a beginner
|
|
|
|
|
himangshuS wrote: ACE_Message_Block * pMsg = ___allocCon(ACE_Message_Block,(sizeof(void*),xxx ));
before compilation, the above would be expanded as
ACE_Message_Block * pMsg = new ACE_Message_Block sizeof (void*) 8001.
but still i have some confusion on the ',' used after size of.
hope somebody may answer it in better.
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
There is a placement new operator which takes 2 parameters.
But it's called differently.
It is declared as void* operator new(size_t size, void* ptr);
It is called as new(ptr) ClassName;
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
|
you can do the following,
1. Add the class in to your solution explorer
2. Put the .h file in the program folder.
3. #include "SpreadSheet.h" where you want to call it
4. Create an instance of the class where you want to access it something like
CSpreadSheet SpreadSheet;
Use the instance to call the functions from the class.
Hope it helps
|
|
|
|
|
thanks for reply.
When i use these step
1. Add the class in to your solution explorer
2. Put the .h file in the program folder.
3. #include "SpreadSheet.h" where you want to call it
then i am getting error
fatal error C1083: Cannot open include file: 'SpreadSheet.h': No such file or directory
so where i did wrong.
|
|
|
|
|
Use
#include "CSpreadSheet.h"
It should work.
|
|
|
|
|
thanks error solved.
modified on Tuesday, July 7, 2009 2:35 AM
|
|
|
|
|
Pick a book on C++ and start reading.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
i have developed SDI application and now i want to load a file from file menu of SDI application. where i have to write the code for file open menu.
|
|
|
|
|
when you develop an SDI Application, you get a default menu. In the File menu there is an option to open the file.
|
|
|
|
|
thanks but if i want to modify default menu according to my needs then where can i do it.
|
|
|
|
|
Document class
Inside the OnOpenDocument().
|
|
|
|
|
i m using vs 2005 and there is no onopendocument() i think.
|
|
|
|
|
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPEWatcherDoc)
public:
virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
//}}AFX_VIRTUAL
Do u tried to add the code?
I never used vs2005, so i can only guess, they didnt removed it.
|
|
|
|
|
|
how to create common memory and acheive synchronization for two applications running parallally
kir_MFC
|
|
|
|
|
create a shared memory and with a semaphore or mutex so as to aviod dead lock.
|
|
|
|