[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] forskel på int og float/double pointere?



root <sslug@sslug> skrev:

> Er der principiel forskel på pointere til int og til float/double?

Man kan ikke antage, at de repræsenteres på samme vis, og derfor ikke
bruge en double* til at pege på en int. Men det har ikke noget med dit
problem at gøre.


> double* pDouble;
> (*pDouble) = 0.0;
> 
> o.l. giver segmentation fault. Hvad sker der?

Det stykke er godt nok (såfremt du sætter pegeren til at pege på en
double midtvejs, selvsagt).

Dit problem er nok et andet sted; prøv at lave et minimalt (men
komplet) eksempel, som udviser fejlen.


Anders.

-- 
Everyone hates me because I'm paranoid.


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 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] *