|
|
Given an array of sorted list of integer numbers, write a function to search for a particular item using the method of binary search. And also show how this function may be used in a program. Use pointers and pointer arithmetic.
|
|
|
|
|
Using pointers, write a function that receives a character string and a character as argument and
deletes all occurrences of this character in the string. The function should return the corrected string
with no holes.
|
|
|
|
|
We ususally don't do homework. Read carefully forum guidelines before posting.
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]
|
|
|
|
|
|
|
|
thanks for your response... unfortunately those links don't actually help me with what i want to do, but interesting all the same.
I've managed to sort it now anyway, cheers.
|
|
|
|
|
Did you use a lot of swearing and bad language in your original question?
It's bad manners to remove questions - other people might learn from them. We live in hope, anyway.
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
I sort of deleted it by mistake to be honest, and didnt know how to undo it.
Sorry.
|
|
|
|
|
As subject, no worries. Glad your problem was resolved.
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Hello,
I tried a lot... but I cannot create a transparent topmost window on a wince based PNA.
SetLayeredWindowAttributes an other stuff were not suported on wince
If I use this
hwnd = CreateWindow(L"testerClass",L"tester Program", WS_OVERLAPPEDWINDOW, -25,-25, 65, 65, NULL, NULL, ghInstance, NULL);
I get a topmost window, titlebar is not visible (thats ok) and a white rectangle....
Is it possible to get the white region transparent?
Thats all I want
Michael
|
|
|
|
|
You can use the AlphaBlend[^] function which is available in Win CE.
Here is an article in CodeProject on Using the AlphaBlend function[^]
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Hi,
do you mean this works also with a window?
I tried this
BLENDFUNCTION bf;
dcOld = GetDC(NULL);
hwnd = CreateWindow(L"testerClass",L"tester Program", WS_OVERLAPPEDWINDOW, -25,-25, 65, 65, NULL, NULL, ghInstance, NULL);
SetWindowPos(hwnd, HWND_TOPMOST, -25, -25, 65,65,SWP_NOOWNERZORDER| SWP_SHOWWINDOW);
dcNew = GetDC(hwnd);
bf.BlendOp = AC_SRC_OVER;
bf.BlendFlags = 0;
bf.SourceConstantAlpha = 120;
bf.AlphaFormat = AC_SRC_ALPHA;
AlphaBlend(dcOld, -25, -25, 65, 65, dcNew, -25, -25, 65,65, bf);
UpdateWindow(hwnd);
but I allways get the window, like without alphablend.....
It sounds very well, if it will work.....
Any suggestions? Waht I did wrong?
Michael
|
|
|
|
|
|
mhh...
the last link, I think, will not work on a WinCE powered PNA, cause the article says that the newest Win32 Api from Win2000 and above is requiered. Also there is no stdafx.h for wince
It looks very interesting but I didnot found something thar could help me.
The first thing, will work on WinCe (btw. I didnot get an Error while compiling) but I do not understand all...
With the first suggestion, I tried this...
BLENDFUNCTION bf;
hwnd = CreateWindow(L"testerClass",L"tester Program", WS_POPUP, -25,-25, 65, 65, NULL, NULL, ghInstance, NULL);
bf.BlendOp = AC_SRC_OVER;
bf.BlendFlags = 0;
bf.SourceConstantAlpha = 120;
bf.AlphaFormat = AC_SRC_ALPHA;
AlphaBlend(destHDC, -25,-25,65,65,srcHDC,-25,-25,65,65,bf);
hwnd is "my" window and stays ontop of the other window , lets say hwnd2.
How should I use dstHDC and scrHDC?
It is enough to call it like
HDC dstHDC = GetDC(hwnd);
HDC srcHDC = GetDC(hwnd2);
This do not change anything... The window (hwnd) is still visible, full visible.
Michael
|
|
|
|
|
Hello:
I need to use WinInet.dll for HTTP in Asynchronous mode.
Right now, I have it working fine but using InternetOpenURL().
As eventually I would need to use POST commands, I would like to work using HttpOpenRequest() and HttpSendRequestEx().
When I use HttpSendRequest() (or HttpSendRequestEx()), I get False as a response, but GetLastError() gives 997 which means 'I/O Pending', what I interpret is Ok as I'm using the function asynchronously. After this, the callback function received the Code 100 which means 'INTERNET_STATUS_REQUEST_COMPLETE', which would mean the request was sent succefully.
However, reading the data, the buffer is empty. Also, I use a sniffer and I can see that there is no HTTP request sent out to the server, so I don't know why the callback receive the 'INTERNET_STATUS_REQUEST_COMPLETE' message but the function apparently failed.
Using the sniffer with the InternetOpenURL() function, I an see the request and the response from the server..
Any idea? What else can I check in order to detect why is not working?
Thanks in advance
Gus
|
|
|
|
|
Is it possible to copy settings from one project to the other.
If so how to do it?
|
|
|
|
|
All project settings of a project are stored in its .vcproj or .vcxproj file which is nothing but an xml file. So all you need to do is to replace the relevant sections by copying from one file to another by opening the file in some text editor like notepad.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Thank you.
I am trying to follow some intructions on how to create Property sheet based application.
When I compile and run in degug mode I get:
I am getting First-chance exception at 0x5d0c373e in LastTry.exe: 0xC0000005: Access violation writing location 0x00416e8c.
In debug mode however when i exit I get a The program '[3124] LastTry.exe: Native' has exited with code 0 (0x0).
I was able to get the original source code from the demo site. When I compiled that and ran it.
There was no exception.
There is one line in my stdafx.h which is not in the original source code.
It is to do with :
#include <afxcontrolbars.h> // MFC support for ribbons and control bars
How do I resolve this issue?
I have tried to comment the above line obviously gives me more compile errors.
What could I have done wrong? Or is it something that was not right in my install of VStudio 2008?
|
|
|
|
|
You should single step using the debugger and find out the line where you get the first chance exception.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
in debug before I go here no exception error:
BOOL bResult = CPropertySheet::OnInitDialog();
I get the error inside this...
|
|
|
|
|
I am sorry I am not trying to be a pain. This is frustratung me...
Here is what I did...Any suggetions...
On a different machine i went down in versions..from 2008-2005-and finally to VStudio 6.
I used the same steps in all ..I got the same exception error except in Vstudio 6..Where I got no exception error...Imported the same project into my Visual Studio 2008 and it works fine...No First-chance error.
I am not sure what to do? ...Well for now I can work with this imported project...but is this really a solution?...I have come to the end of the rope on this one...If I did something wrong, would VStudio 6 not complain as well?
Do you think you can advice me as what to do? I don't like to give up, at the sametime I don't want to be hitting my head if it is a bug in VStudio 2008?
I can't see me to be the only one trying or using the property sheet based application?
Thanks, I will really appreciate some sort of feed back, I am new at this and it's frustrating me..Please advice. 
|
|
|
|
|
Salut
je suis en train de codé une dll C++, cette derniere doit appelé une methode dans une autre dll .NET, afin de récuperer le resultat renvoyé par la methode .NET, j'utilise Visual c++ 6.0.
Csharp c'est du code managé or c++ c'est que du natif.
je vous demande est ce que c'est possible ou non??
Remarque :
j'arrive bien a chargé la dll .net, mais le probleme que j'ai mnt c'est l'appel de la methode .net.
A vs.
|
|
|
|
|
If Google translator worked right, yes, it's possible. I do exactly that on a project I'm on right now. You'll want to export your entry points in the C++ DLL using a .def file so they are undecorated and _cdecl. You then create an interop class in C# (I prefer placing the interops in a dedicated internal static class with the [SuppressUnmanagedCodeSecurityAttribute] and then exposing a public C# interface with full error checking and so forth.
There are several articles on the web and here in code project which use this technique.
|
|
|
|
|