[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] Bugg eller tankemiss ??



On Mon, 15 Mar 1999, J.H.Povlsen wrote:
> du glemmer  at gange med sizeof(char)
Er der nogen risiko for at (sizeof(char) != 1) ????

> kopia=(char*)malloc((min_strlen(str)+1)*sizeof(char));
Det udtrykker nok mere nøjagtigt den oprindelige hensigt, men der er jo
slet ikke grund til at multiplicere med sizeof(char)...

Problemet med det oprindelige program var så klart anvendelsen af gets()


/Bjørn

---
"Have you ever noticed that there are plenty of C books with suggestive
names like "C Traps and Pitfalls", or "The C Puzzle Book", but other
programming languages don't have books like that?" - Peter van der Linden




 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:07 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *