[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] C-programmering i MS Visual Studio



atoi betyder "ASCII to Integer" og den tager en pointer til et tal i
ASCII og returnerer det som integer.

eksempel:

unsigned char *c="123";
int tal;

tal=atoi( c );
printf( "%d", tal )

Denne skulle gerne vise 123 som output.

m.v.h.
Søren

Jesper wrote:
> 
> Ok.... et andet simpelt spørgsmål
> 
> funktionen atoi hvad gør den egentligt?? Sikrer at en given input ER en
> integer eller??
> 
> - Jesper
> 
> "Jesper" <sslug@sslug> wrote in message
> news:sslug@sslug
> > For det første kan jeg godt programmere C i en C++ compiler ik'? Men ikke
> > omvendt selvfølgelig...
> >
> > Men jeg har et problem...
> >
> > Jeg er nybegynder og jeg vil lave noget så simpelt som en tekst det looper
> > et vist antal gange og så ville det jo muligvis se sådan ud:
> >
> > #include <stdio.h>
> >
> > main () {
> >
> >     int i;
> >
> >     for(i=0 ; i<10 ; i=i+1)
> >     printf("Loop!\n");
> > }
> >
> > På forhånd tak
> >
> > - Jesper
> >
> >


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

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