|
There could be already a running instance of Common.exe. Open up your task manager and kill that process if it shouldn't be running.
|
|
|
|
|
Your exe is still running so it cannot be replaced. Close it first before compiling again.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
|
I am using MSXML(not MSXML2 or MSXML3) in my code, But i am getting error when i call functions GetDocumentElement() and creatNode().
plz help.
here is my code..
MSXML::IXMLDOMNodePtr m_pXmlDomDoc;
..<br />
..<br />
..<br />
pRootNode = m_pXmlDomDoc->getDocumentElement();<br />
..<br />
..<br />
..<br />
pRootNode = m_pXmlDomDoc->createNode(v, "SSL-EMAIL", "");
and these are the errors i am getting.....
error C2039: 'getDocumentElement' : is not a member of 'MSXML::IXMLDOMNode' <br />
error C2039: 'createNode' : is not a member of 'MSXML::IXMLDOMNode'
|
|
|
|
|
The get_documentElement and createNode are members of IXMLDOMDocument , and not of IXMLDOMNode interface.
Try to get the needed interface using implicit routines, like this:
MSXML::IXMLDOMDocumentPtr doc = m_pXmlDomDoc;
If it works, use this pointer instead.
|
|
|
|
|
sach!! wrote:
I am using MSXML(not MSXML2 or MSXML3) in
Is it compulsory for you to use MSXML?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
hi all
i have a problem .
In Listbox by typing the first character of a selection the item can be selected
is it possible to restrict this property of list box
if possible how??
"Men never do evil so completely and cheerfully as when they do it from religious conviction"
-Pascal
|
|
|
|
|
you write one question is same with Here[^]
whitesky
|
|
|
|
|
ya i thought some people may not have seen that who know it
so i posted again
"Men never do evil so completely and cheerfully as when they do it from religious conviction"
-Pascal
|
|
|
|
|
I asked you one question but you dont answer to me
whitesky
|
|
|
|
|
Problem
It is a tale of two friends, A and his colleague B working in a software company FIFO. Both of them have interest in coding and are pretty good at it. At times you cannot even differentiate who is better than the other. Their manager decided to use the Lines of Code (LoC) written by them to judge their smartness. He is going to appraise them on the basis of who has written more lines of code in that year.
In the beginning of the year, he gives A and B a set of modules for the year with his estimation of lines of code for each module. He asks both of them to divide the modules among themselves.
To divide the modules, B offered to split them using following system: they both take turns, each time choosing one module from either end of the set. He even generously offered A to make the first choice.
You need to write a C code to tell the total lines of code A will write compared to B if A chooses first. Of course we will assume that both A & B are brilliant, and since their appraisals depend on this, they will always choose in a way to try and end up with the maximum number of Lines of Code in their share.
The program must take input as the number of modules in the set given by the manager followed by the estimated lines of code for each of the module. The program should print how much more lines of code A will write than B. The value can be negative in case A writes less code than B. It should also print who gets the better grade in appraisal at the end of this year. In case both A and B gets same grade, print “NONE”.
Constraints
- Module set will contain between 1 and 50 elements inclusive.
- Each module will have lines of code between 1 and 10000 inclusive.
- Use standard scanf and printf as input and output methods. Please go through the test cases sample to understand the expected input and output. The input/output format in your program should be as given in the examples.
Test Cases Sample:
1. Input:
2
400 400
Output:
0
NONE
HINT: There are two modules in the set with LoC as 400 and 400. A starts first and chooses 400 and B chooses 400. Hence Answer is (400-400 = 0) and they both get the same grade.
2. Input:
3
200 700 400
Output:
-100
B
HINT: There are three modules in the set with LoC as 200 700 and 400. A chooses 400, followed by B choosing 700 and then A chooses 200.
3. Input:
4
1000 10000 900 50
Output:
8150
A
HINT: There are four modules in the set with LoC as 1000 10000 900 and 50. A chooses 50, B chooses 1000, then A chooses 10000 and then B chooses 900.
4. Input:
50
1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10
Output:
25
A
HINT: There are 50 modules in the set. Use your code to figure out how it works
Solve this and check u r talent in C.
Thanks in advance...
Ashok.
|
|
|
|
|
Looks like homework, and a complicated one.
|
|
|
|
|
ashok3450 wrote: Solve this and check u r talent in C.
First of all Check this[^].. Then have vote 1 from My side!...
Why don't you urself test your talent in C? ... rather testing Talents of people here.
I would be sounding rude to you? but that truth we(i.e. People here) don't help in Homeworks..
If you have some specific problem related it we can solve!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
i have a picture control on a dialog i want to convert the points withr espect to dialog to with respect to picture control.
thank u in advance,
sree.
|
|
|
|
|
If you have a CPoint value that contains coordinate relative to dialog, then you can try this in your dialog:
CPoint p = ...;
ClientToScreen(p);
m_cMyPicture.ScreenToClient(p);
Hope it helps.
|
|
|
|
|
I am currently working on a project where I need to use a number of icons and store them in a datafile that also contains other data. I could use something like:
ICONINFO Info;
DWORD dwSize;
char Bits [5000];
char Mask [ 250];
if ( m_hIcon == (HICON)1
|| m_hIcon == NULL)
return ;
GetIconInfo (m_hIcon, &Info);
dwSize = GetBitmapBits (Info.hbmColor, 5000, Bits);
dwSize = GetBitmapBits (Info.hbmMask , 250, Mask);
I could get the icon back again by using the CreateIconIndirect routine, using the data that I extracted in the above way.
However, this results in 4096 bytes of colorbits and another 128 bytes of mask data, whereas the original .ico file is only 766 bytes! Does anyone have a better idea on how to extract the bits of the icon and put them back in another icon again?
Secondly, I would very much like to add a very simple icon editor to my program. Does anyone know of an open-source icon editor that I could include in my project?
Thanks in advance,
William
|
|
|
|
|
Engberts wrote: Does anyone have a better idea on how to extract the bits of the icon and put them back in another icon again?
If you want to preserve the database space, I think you should compress the data.
If you work with source *.ico files, you can store the content of these files.
Otherwise, if you create icons dynamically, you can try to save your HICON objects to *.ico format. For this, you can try the CxImage library available at http://www.codeproject.com/bitmap/cximage.asp[^]. With this library, you can store the icon to a memory or disk file, and then store this content to database.
Alternatively, you can use a third-party compression procedure. For instance, you can try zlib library from http://www.zlib.net[^].
|
|
|
|
|
consider a class
Class C
{
private:
int a;
int b;
};
then i write a copy constructor.
i believe copy constructor can be written in two wayz:
C& C::operator=(const C&);
void C::operator=(const C&);
In the former case, we deference by returning this* and the latter we dont return anything, so here is my question:
which one of the above is better??(in terms of efficiency)
|
|
|
|
|
The efficiency of the two does not realy differ very much. Of course, the first way comes with some additional machine instructions. It mainly depends on what you want to do with your constructor.
William
|
|
|
|
|
namaskaaram wrote: which one of the above is better??(in terms of efficiency)
I think first one is good to direct the reference correctly. As well we can give the gurantee of consistency in data.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Actually "copy constructor" is this one: C(const C & ) ;
Regarding overloading assignment operators, I think your first variant, which returns a reference, allows multiple assignments like this: a = b = c , or compact expressions like this: f(a = b) . The second one does not allow this, but is little faster because of missing return value.
-- modified at 4:24 Tuesday 20th June, 2006
|
|
|
|
|
actually i meant assignment operator overloading....sorry abt the typo! ;o)
thank u all!!!!
|
|
|
|
|
Viorel. wrote: The second one does not allow this, but is little faster because of missing return value.
You'll save 1, or maybe 2 CPU cycles. (Depending on how the compiler allocates registers, you may end up saving no cycles)
|
|
|
|
|
in fact, prefer the following operator :
C& C::operator = (const C&);
the reason to prefer this one instead of the void operator is that the user of your class will then be able to cascade the assignment operations. consider this :
int i1, i2, i3;
C c1, c2, c3;
i1 = i2 = i3 = 5;
c1 = c2 = c3 = ;
this is possible only because the operator = returns a reference to the object it has just modified...
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
Yes, you're right. The rationale is that the assignment operator should behave in the same way as assignment for primitive types.
Kevin
|
|
|
|