[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
 

initalisering i c



Hej

Håber der er en der kan hjælpe mig med et umiddelbart banalt spørgsmål!

Hvordan initialisere man et char array i c ??

Char line[50]  så det bliver en helt tom streng??


Den bliver brugt til at modtage en kommando via læs fra socket

Char line [50];
Char c;

while ( ch != '\n')
{
read (fd, &ch, 1);
line[y] = ch;
y++;
}

fd = socket nr.

Strengen bliver brugt flere gange i træk og med tekster i forskellige
længder + der kommer noget "fnider"  ind til sidst i strengen??

Håber der er en der vil forbarme sig! :)

Hej
Bo Mangor




 
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] *