|
I didn't look at your code because I think there is a problem with your approach to analyzing your issue. You are doing two different things so simplify that by doing just one at a time. You can test socket code on one machine without any network connection at all. Also you can test your ad hoc network configuration by using freely available socket applications rather than your code. Prove that each works independent of the other before integrating them.
|
|
|
|
|
Hi!
Finally I managed to make it work, it was a problem with the IP adress of both computers which were not good. I changed these IP adress to new ones which were corresponding to private IP adress and it works well now.
Thanks everybody for your answers.
|
|
|
|
|
Use the same port number for both client and the server.
He's become a household word in the Lounge. A whole new phraseology has evolved. Post a link or reply with a smiley and rose, and you've made a "Satipsism". So what? It's an interesting thing about the Internet, the evolution (as in change, not progress) of tone, quality, terminology, etc.
-Marc Clifton.
Best wishes to Rexx[^
|
|
|
|
|
It has been a week i am working on a programme that read .txt files. If one of those file has the same beginning that a model file ( except the first line) then the programme has to rename the file.This part of the programme works.
The thing is thatthe names of files that must be compared to the modele file change every day. Therefore, i use a programme which lists every file in the directory in a txt file.
Then i read the listfile and assign to a string each name of file and compare those files to the modele file. However, althaug i spend hours and hours on this programm, i still have problems... can anyone help me by having a look at the programme... i can send the programme, modele file, the programme to list every file in a directory, and files that must be compared.
Thank you very much in advance!!
|
|
|
|
|
Do you use the debugger to find your problems?
I'd suggest you do so and try to localize whatever issues you have. Then you can post some source code so the rest of us can help. You probably won't have much success finding someone to take your program and test it for you.
|
|
|
|
|
Ok. What is the difference between a debugger and a compilator?
|
|
|
|
|
The compiler makes an executable out of your code. The debugger shows you step by step how the code is executed, lets you interrupt the execution and watch variables value.
|
|
|
|
|
I have sent you a mail to offer my help but got no answer. Did you provide a real email address ?
|
|
|
|
|
Yes it s a real one but i don´t have internet on week end. Sorry! I have just checked my mail on guillaume.arfaoui@eleves.ec-nantes.fr but i did not receive any mail from you. Just give me your mail so that i can send you a zip file.
Anyway thank you very much for your help!
|
|
|
|
|
Send that one to
deja
vu
nic
@
Gm ail
He's become a household word in the Lounge. A whole new phraseology has evolved. Post a link or reply with a smiley and rose, and you've made a "Satipsism". So what? It's an interesting thing about the Internet, the evolution (as in change, not progress) of tone, quality, terminology, etc.
-Marc Clifton.
Best wishes to Rexx[^
|
|
|
|
|
ok thank you very much! i would like to send it right now but i don´t catch your mail...
its dejavunic@Gmail.???
|
|
|
|
|
Hello,
I'd like to know if it's somehow possible to obtain a transparency effect for a control (let's say a button for example) placed over a video playing window in WinAPI/MFC without using advanced graphics programming (e.g DirectX, OpenGL).
To be more specific the first example that passes through my mind are the button controls in RadLight video player.
The WinAPI SetLayeredWindowAttributtes function does its job quite ok but the result contains an ugly flicker effect.
Many thanks in advance for any answer
|
|
|
|
|
I think you got it all in the question: Yes it is possible, but not without the ugly flickering.
|
|
|
|
|
It can be done if you have control over your video rendering.
Some ways to eliminate flicker are double buffering (or drawing on each video frame before it's
rendered) and using clipping regions.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
garfaoui wrote: lead to the following error: <;146 C:\Documents and Settings\garfaoui\Ambiente de trabalho\test\clippr\main.cpp no matching function for call to `strcmp(std::string&, std::string&)' >
perfecty normal to me :p
|
|
|
|
|
oh yes? ... why? what should I type?
|
|
|
|
|
string s1 = "shilpi";
string s2 = "shilpi";
if(strcmp(s1.c_str(),s2.c_str())==0)
{
printf("Hi");
}
what i wanna say is this ,try it
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
that's crap. why in hell do you cast the strings objects to C-style strings to use the C runtime to compare them, when the string class provide various comparison operators ?
|
|
|
|
|
It is up to you ..i m just giving u one solution
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
i'm not the guy who was asking. and me too is trying to give best answers...
so please read the other posts when you have answers to see if it has not already been submitted, or if someone gave a better answer
|
|
|
|
|
Hello,
how to check if an object has a valid adress or is valid pointer?
I got errors when i try to clear CMapStringToOb!
tanks for help!
termal
|
|
|
|
|
I have the same problem.Trying to check a pointer validity i get Access Violation
void CMainFrame::OnSize(UINT nType, int cx, int cy)
{
CFrameWnd::OnSize(nType, cx, cy);
if ( (m_hWnd != NULL) && (m_pRightPaneFrame !=NULL) )
{
------------->if (m_pRightPaneFrame->m_pSplitterView != NULL) ----> I get Unhandled exception in XXXXX : Access Violation
{
}
}
}
Is there anyway to check an unallocated pointer for validity without getting errors ? What seems to be wrong here ?
Regards,
sdancer75
|
|
|
|
|
In practice, you can't. The only way to know whether an address is valid is to try it; if not valid you'll get an access violation. That still won't tell you whether the pointer value actually points to what you expect it to.
The only answer is to be disciplined. Avoid pointer arithmetic whenever possible. Prefer using classes to raw data structures, so that bounds can be checked. Ensure all variables are initialised. Use smart pointers. Do these, and the chances of random memory corruption are much reduced.
|
|
|
|
|
As stated by Mike Dimmick, be disciplined.
However, IMHO, you don't need avoid pointer usage: you have only to handle pointers with care. For instance, always initialise pointers, either with NULL or with a valid memory area. Remember also to set to NULL a pointer immediately after you've released the pointed area.
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.
|
|
|
|
|
Hello,
thanks for answers!
regards
termal
|
|
|
|