Click here to Skip to main content
16,007,277 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow can I change the ip configuration of the local host using vc? Pin
indian33-Nov-02 15:30
indian33-Nov-02 15:30 
AnswerRe: How can I change the ip configuration of the local host using vc? Pin
imran_rafique3-Nov-02 15:59
imran_rafique3-Nov-02 15:59 
AnswerRe: How can I change the ip configuration of the local host using vc? Pin
ian mariano3-Nov-02 23:42
ian mariano3-Nov-02 23:42 
GeneralThread in DLL Pin
stevenson3-Nov-02 15:04
stevenson3-Nov-02 15:04 
GeneralRe: Thread in DLL Pin
Le centriste3-Nov-02 16:43
Le centriste3-Nov-02 16:43 
GeneralRe: Thread in DLL Pin
stevenson3-Nov-02 19:06
stevenson3-Nov-02 19:06 
GeneralRe: Thread in DLL Pin
Paul M Watt3-Nov-02 19:49
mentorPaul M Watt3-Nov-02 19:49 
GeneralPointers, casting and volatile Pin
Jay23-Nov-02 13:55
Jay23-Nov-02 13:55 
Hello I'd like to declare a char* that points to a void* but i dont know the best way to do this, I thought i could use type casting but it appears not.
I'm trying to use strcmp to compare 2 char* pointing to buffers the code is this...

void * __cdecl buffer= malloc(100);<br />
void * __cdecl buffer2 = malloc (100);<br />
__int64 filel1 =_filelengthi64( firstfiledone);<br />
__int64 filel2 =_filelengthi64( firstfiledtwo);<br />
if (filel1!=filel2)<br />
        return 1;<br />
char* b,b2;<br />
int trys1=filel1/100,count;<br />
for (count=0;count<filel1;count=count+trys1)<br />
	{<br />
	fread( buffer, 1, 100, s1 );<br />
	fread( buffer2, 1, 100, s2 );<br />
	b= (char*) static_cast <char*> (void * __cdecl) buffer;<br />
	b2= (char*) static_cast <char*> (void * __cdecl) buffer2;<br />
	if ((strcmp (b,b2))==0)<br />
		{<br />
		printf ("ok");<br />
		}<br />
        }


But that way doesnt work so is there any way of easily doing this?
Also what is a volatile pointer. As i've previously copied a supposedly volatile pointer bit by bit, then re-used it later with no bad effects, is this method sloppy code?

Thanks hope you can help ! - Jason Poke tongue | ;-P
ps tried to get rid of them errors in the code with the boolean expression things dont know if it worked
GeneralRe: Pointers, casting and volatile Pin
Nick Parker3-Nov-02 15:51
protectorNick Parker3-Nov-02 15:51 
GeneralRe: Pointers, casting and volatile Pin
ian mariano3-Nov-02 15:57
ian mariano3-Nov-02 15:57 
GeneralRe: Pointers, casting and volatile Pin
Jay24-Nov-02 5:46
Jay24-Nov-02 5:46 
GeneralRe: Pointers, casting and volatile Pin
ian mariano4-Nov-02 6:54
ian mariano4-Nov-02 6:54 
GeneralRe: Pointers, casting and volatile Pin
Jay24-Nov-02 5:57
Jay24-Nov-02 5:57 
GeneralRe: Pointers, casting and volatile Pin
Christian Graus3-Nov-02 16:38
protectorChristian Graus3-Nov-02 16:38 
GeneralRe: Pointers, casting and volatile Pin
Jay24-Nov-02 5:27
Jay24-Nov-02 5:27 
GeneralRe: Pointers, casting and volatile Pin
Christian Graus4-Nov-02 11:28
protectorChristian Graus4-Nov-02 11:28 
QuestionHow to fully override a pop-up menu item? Pin
3-Nov-02 13:26
suss3-Nov-02 13:26 
GeneralWindows 98 Problems Pin
Swinefeaster3-Nov-02 11:15
Swinefeaster3-Nov-02 11:15 
GeneralRe: Windows 98 Problems Pin
Swinefeaster3-Nov-02 21:55
Swinefeaster3-Nov-02 21:55 
GeneralRe: Windows 98 Problems Pin
Christian Graus3-Nov-02 11:35
protectorChristian Graus3-Nov-02 11:35 
GeneralRe: Windows 98 Problems Pin
Swinefeaster3-Nov-02 21:53
Swinefeaster3-Nov-02 21:53 
GeneralRe: Windows 98 Problems Pin
Swinefeaster5-Nov-02 19:19
Swinefeaster5-Nov-02 19:19 
Generaldocument filter Pin
tom20003-Nov-02 10:26
tom20003-Nov-02 10:26 
GeneralRe: document filter Pin
Christian Graus3-Nov-02 11:36
protectorChristian Graus3-Nov-02 11:36 
GeneralRe: document filter Pin
Chris Richardson3-Nov-02 12:49
Chris Richardson3-Nov-02 12:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.