care to elaborate on that?<br><br><br><pre><code><br>#include <memory.h><br>#include <stdio.h><br><br>void main( void )<br>{<br> char buffer[] = "This is a test of the memset function";<br><br> printf( "Before: %s\n", buffer );<br> memset( buffer, '*', 4 );<br> printf( "After: %s\n", buffer );<br>}<br></code></pre><br><div class="label"> <b>Output</b></div> <pre><code>Before: This is a test of the memset function<br>After: **** is a test of the memset function<br><br></code></pre><br><br><br><b><i>Nistur <nistur@googlemail.com></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> Actually, forget about that, turns out I was doing something stupid <br>somewhere else :)<br><br>Nistur wrote:<br>> Hmmm, I've got a graphics programming module that I've kinda been <br>> neglecting as we have to demonstrate it on Windoze machines and I can
<br>> never be bothered to boot 'doze...<br>> I have finally got motivated though and decided to make an environment <br>> similar to what we have been given, which was using the Windows API... <br>> Thankfully our lecturer based his framework on the NeHe tutorials, <br>> which also have a Linux copy of their tutorials handy. The problem <br>> comes in the slight differences between NeHe and what we have. The <br>> problem I have at the moment is that the windows stuff we have has <br>> this in it:<br>> Image *Texture[1]; //Creates storage space for the texture <br>> Width hieght info etc, and the data itself .<br>> memset(Texture,0,sizeof(void *)*1); //makes sure the pointer is <br>> set to null.<br>> Image being a struct that was previously defined. I have looked this <br>> up on google and the only thing that comes up is a string function, <br>> which this doesn't appear to match. Anyone know what I'm talking
<br>> about? I sure as hell don't :) Kinda be interested if someone knows a <br>> solution, I ran it once with memset commented and it worked fine :P <br>> Then I tried to run it again and I got a segmentation fault (which I <br>> tracked to the memset just to be sure, well actually the function call <br>> after the memset where it tries to write to the struct...)<br>><br>> ------------------------------------------<br>> http://nistur.chaosnet.org<br>><br>><br>------------------------------------------<br>http://nistur.chaosnet.org<br><br><br>_______________________________________________<br>dundee GNU/Linux Users Group mailing list<br>dundee@lists.lug.org.uk http://dundee.lug.org.uk<br>https://mailman.lug.org.uk/mailman/listinfo/dundee<br>Chat on IRC, #tlug on dundee.lug.org.uk<br></blockquote><br><p> 
<hr size=1>
Yahoo! Answers - Get better answers from someone who knows. <a
href="http://uk.answers.yahoo.com/ ;_ylc=X3oDMTEydmViNG02BF9TAzIxMTQ3MTcxOTAEc2VjA21haWwEc2xrA3RhZ2xpbmU">Try
it now</a>.