sizeof and character arrays
  Home FAQ Contact Sign in
 
Advanced search
MATCHING GROUPS



more...
POPULAR GROUPS

more...

found 745 articles for 0.042 sec
Re: Operator Overloading: new and new[] operators     

Group: comp.lang.c++.moderated · Group Profile · Search for sizeof and character arrays in comp.lang.c++.moderated
Author: Thomas Richter
Date: Jun 13, 2008 17:37

...:ArrayOperatorNew.cpp // Operator new for arrays #include <new> // Size_t definition #include <... to memory allocated for a character array of size // sz. Should ... number of bytes to // store array information + bytes for memory alignment ... is (typically) more wasteful because sizeof(int) need not to be ...
Show full article (3.68Kb) · Show article thread
Re: echo client/server give problems if array sizes are different     

Group: comp.unix.programmer · Group Profile · Search for sizeof and character arrays in comp.unix.programmer
Author: Brice Rebsamen
Date: Jun 10, 2008 23:11

... A consistent confusion between arrays of characters of known length and ...pthread_t tid; memset( &servaddr, '\0', sizeof(servaddr) ); if( argc == 2 ) { my_port ... bind( server_fd, (struct sockaddr*) &servaddr, sizeof( struct sockaddr )) ) { fprintf( stderr, "BIND...MY_SERVER ); memset( client_str.sin_zero, '\0', sizeof( client_str.sin_zero ) ); if( connect( sockfd...
Show full article (7.65Kb) · Show article thread
Re: String function problem     

Group: comp.lang.c · Group Profile · Search for sizeof and character arrays in comp.lang.c
Author: pete
Date: Jun 10, 2008 08:56

... as a pointer to a character. Array name without any indexes ... the first element of the array in a context where a...the first element of the array. That's wrong. The standard...is the operand of the sizeof operator or the unary & operator...literal used to initialize an array, an expression that has type...the initial element of the array object and is not an...
Show full article (2.25Kb) · Show article thread
comp.lang.c FAQ list Table of Contents     

Group: comp.lang.c.moderated · Group Profile · Search for sizeof and character arrays in comp.lang.c.moderated
Author: Steve Summit
Date: Jun 1, 2008 03:00

...Section 7. Memory Allocation Section 8. Characters and Strings Section 9. Boolean ...use statically- and dynamically-allocated multidimensional arrays interchangeably when passing them to ... leave out the multiplication by sizeof(char) when allocating strings? 7....'t I assign strings to character arrays? 8.6: How can I... Will fflush(stdin) flush unread characters from the standard input stream?...
Show full article (30.21Kb)
comp.lang.c FAQ list Table of Contents     

Group: comp.lang.c · Group Profile · Search for sizeof and character arrays in comp.lang.c
Author: Steve Summit
Date: Jun 1, 2008 03:00

...Section 7. Memory Allocation Section 8. Characters and Strings Section 9. Boolean ...use statically- and dynamically-allocated multidimensional arrays interchangeably when passing them to ... leave out the multiplication by sizeof(char) when allocating strings? 7....'t I assign strings to character arrays? 8.6: How can I... Will fflush(stdin) flush unread characters from the standard input stream?...
Show full article (30.21Kb)
comp.lang.c FAQ list Table of Contents     

Group: news.answers · Group Profile · Search for sizeof and character arrays in news.answers
Author: Steve Summit
Date: Jun 1, 2008 03:00

...Section 7. Memory Allocation Section 8. Characters and Strings Section 9. Boolean ...use statically- and dynamically-allocated multidimensional arrays interchangeably when passing them to ... leave out the multiplication by sizeof(char) when allocating strings? 7....'t I assign strings to character arrays? 8.6: How can I... Will fflush(stdin) flush unread characters from the standard input stream?...
Show full article (30.21Kb)
Re: view son this program     

Group: comp.unix.programmer · Group Profile · Search for sizeof and character arrays in comp.unix.programmer
Author: Moi
Date: May 29, 2008 15:58

... a chunk of memory that is longer than the sizeof(arrc) ... therefore you're overwriting something that doesn't... or whatever else comes directly after the arrc array, which in practice is not too unlikely too .... In this case the memset() isn't even needed (some people initialize character arrays to zero to make strxxx() functions to behave correctly. For mysterious reasons obviously)....
Show full article (1.99Kb) · Show article thread
Re: Need help with multi-dimensional arrays and functions     

Group: comp.lang.c · Group Profile · Search for sizeof and character arrays in comp.lang.c
Author: Szabolcs Borsanyi
Date: May 24, 2008 14:50

... contents */ dbf = (int *)malloc(i*sizeof(int)); The (int*) is superfluous ...maintain than sizeof(int) /* Read .dbf file into array dbf */ i...nchars */ *input_array = (char ***) malloc (nrows*sizeof(char **)); these casts in front...j] will be better } } /* Initialize array contents to NULL */ for (i...that '\0' is the four character long-hand for 0 (both...
Show full article (5.77Kb) · Show article thread
Re: reinterpret_cast     

Group: comp.lang.c++ · Group Profile · Search for sizeof and character arrays in comp.lang.c++
Author: saurabh
Date: Jun 10, 2008 22:37

... Tho the reason to print those bytes as characters instead of printing their numeric values avoids me....standard says that you can treat PODs as array of chars this applies to their object representation (the bytes array that make the POD object contents as given by sizeof()) but they do not also mean the... of the integer I can guess what characters would be printed. I want to know ...
Show full article (1.48Kb) · Show article thread
Re: reinterpret_cast     

Group: comp.lang.c++ · Group Profile · Search for sizeof and character arrays in comp.lang.c++
Author: dizzy
Date: Jun 10, 2008 07:07

... Tho the reason to print those bytes as characters instead of printing their numeric values avoids me...standard says that you can treat PODs as array of chars this applies to their object representation (the bytes array that make the POD object contents as given by sizeof()) but they do not also mean the ...and printing/interpreting their values in that char array of yours won't make much sense)....
Show full article (1.33Kb) · Show article thread
1 · 2 · 3 · 4 · 5 · 6 · 7 · 8 · 9 · next