|
kbury wrote: I have tried this...
Did you compare with the code snippet I provided?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I tried and changed to the code snippet that you had, this is what I get.
34
24
3
32
33
50
I need it to print for example
LOTTO PICKS
3 8 12 21 22 39
and cannot seem to fix it to do that
|
|
|
|
|
Did you implement sortArray() (or just leave it empty)?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
In function fillArray :
kbury wrote: P=-1;
is wrong, change to
PASS = -1;
In function printArray
kbury wrote: N[P] = N[PASS];
is wrong, change to:
N[PASS] = N[P];
Some remarks (feel free to ignore...)
- There are better ways for implementing the
fillArray function (i.e. avoiding the 'duplicates' extraction). - Messing up with the loop index is a very inelegant practice.
printArray really should be called sortArray .
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]
|
|
|
|
|
Thank you very much for your help. I have been working on this for about one week now. I really appreciate it.
It works perfect now.
|
|
|
|
|
You're welcome.
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]
|
|
|
|
|
please help me, brother! thanks
|
|
|
|
|
Check out the IShellLink interface.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
thanks, but my compiler is vc6.0, can it use the interface
|
|
|
|
|
Certainly.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
As David said, you can use the IShellLink::GetPath .
|
|
|
|
|
can you give me some example code of vc6.0, thank you very much
|
|
|
|
|
thank you a lot, i have got it!
|
|
|
|
|
As i was created multiple threads.When iam start thread, it calls a document class to store some information using structure and then update the structure values to view by using update all views fuction..values also updated to view while using release mode but if iam using debug mode to run application,,if the debug pointer moves to update all views function--.error message "debug assertion failed" occurs in wincrore.cpp(with line no:888)..what's the solution for these types of error causing?
mail:t.r.yuva@gmail.com
|
|
|
|
|
ram84 wrote: "debug assertion failed" occurs in wincrore.cpp(with line no:888)
Open that file and check which assertion fails (hint: line no. 888).
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Rajesh R Subramanian wrote: ram84 wrote:
"debug assertion failed" occurs in wincrore.cpp(with line no:888)
Open that file and check which assertion fails (hint: line no. 888).
Ah, your marvellous hints...
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]
|
|
|
|
|
Me? marvelous hint?
Ah, these monkeys! They attend to it when I'm away.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
i want to get the pixel values of character drawn inside rectangle present on dialog which is created by following code in OnPaint() function
CPaintDC dc(this);
CPoint pt;
//for showing image
dc.BitBlt(offsetx,offsety,m_size.cx,m_size.cy,
&m_dcMem, sourcex, sourcey,SRCCOPY);
erase=false;
//Code for showing rectangle
dc.Rectangle(100,200,200,300);
RectBackground.SetRect(100,200,200,300);
CBrush brush;
brush.CreateSolidBrush(RGB(255,255,255));
dc.FillRect(RectBackground,&brush);
dc.DrawFocusRect(&RectBackground);
anyone can tell me how i can get pixel values of character drawn inside rectangle so that i can recognise what is drwn inside rectangle on button click event.
|
|
|
|
|
I need to compare two XMLs,
1st XML returned by a program, the 2nd XML contain the XML path and values.
the 1st XML wight/will be larger than the 2nd and it is ok.
the program expect to go over the 2nd XML and make sure that the path exists in the 1st and also the attribute exists.
the program expected to throw/write error massages in case of XML path ot attribute/valueus do not appear in the 1st XML. That program expected to run on Unix.
Thanks,
Josepe
|
|
|
|
|
Hi All
In windows TaskManager Application show currently open application name.can i check windows TaskManager?Plz help me
|
|
|
|
|
MsmVc wrote: can i check windows TaskManager?
As best I can tell, you are wanting a list of running applications like Task Manager shows. Is that correct?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
how can i do it?Plz help me
|
|
|
|
|
Have you tried EnumProcesses() or the Process32First() /Process32Next() pair?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi guys I have a simple question for your.
Let say that I have CreateFile function that takes as a first argument a LPCTSTR pointer.
Also there is a declared buffer as char* szBuffer . I' ve seen a lot of guys using a typecasting
for calling CreateFile like this CreateFile((LPCTSTR)szBuffer,....). I simply use
CreateFile(szBuffer,....) with no problems
Is that typecasting needed, given that both char* and LPCTSTR are pointers. Are there any true gains by
using typecasting?
Thanx
|
|
|
|
|
FotisSs wrote: I' ve seen a lot of guys using a typecasting
Well, they were wrong... LPCTSTR is an array of TCHAR and the definition of a TCHAR depends if UNICODE is enabled or not. So, the code will work fine if UNICODE is not defined but it will not work if UNICODE is defined. In which case, if you have the typecast, it will simply be plain wrong (the string will be corrupted), but if you don't have the cast, then it will not compile (which is way better, because at least you don't have a nasty bug in your code). Typecasts should be avoided at maximum: using them too much means probably that you don't understand what you are doing.
I suggest that you read this article[^], it explains a lot about character encoding (and about TCHAR).
|
|
|
|