|
|
Up |
|
|
  |
Author: arnuldarnuld
Date: Apr 30, 2008 22:40
This program follows from the section 6.5 of K&R2 where authors created a
doubly-linked list using a binary-tree based approach. The only thing I
have rewritten myself is the getword function. I am using it because there
are many concepts involved in this program that I want to understand like:
1.) degree of efficiency of this program as compared to sort using hash-table
based approach.
2.) Keeping the program well structured so that anyone can have a look and
in some amount of time he can draw a map of the design and the
key-concepts involved in a program.
3.) Any other advice you think is important to be given to a beginning C
programmer :)
|
| Show full article (4.69Kb) |
|
| |
6 Comments |
|
  |
Author: Jim LangstonJim Langston
Date: Apr 30, 2008 20:40
I had asked this in comp.lang.c++ with out any answers that would actually
work, so I'm hoping someone here may know a way.
I am calling C library functions that want to output to stdout. I need to
capture this to memory for use internally inside the program without
modifying the library calls that actually do the output.
This is for the GraphViz libraries and it is the output of dot that I'm
actually trying to capture. I have compiled all the libraries and the dot
exectuable which outputs to stdcout. There is also an option to output to a
file and if someone knows a way of redirecting a FILE* to memory that would
work too. There is an option to output to memory but it is a static buffer
that is WAY too small and is broken anyway. When trying this way I get a
memory error and tracing through the code somewhere deep inside the library
it's attempting to write to a FILE*
If no one knows of a way I will have to write a libary function to do this
and have to delve into the GraphViz libraries and try not to come across the
same bug that the pervious person who was attempting to write to memory
does.
|
| Show full article (1.45Kb) |
|
| |
14 Comments |
|
  |
Author: Bob NelsonBob Nelson
Date: Apr 30, 2008 20:27
Right next to K&R2 on my bookshelf is _C Programming: A Modern Approach_ by
Professor K.N. King. The second edition of this book is now available. See
this URL for details:
http://knking.com/books/c2/
I don't think I'm alone among c.l.c. participants in recommending this book
(based upon the very good first edition).
|
| |
|
6 Comments |
|
  |
Author: S.S.
Date: Apr 30, 2008 18:41
Hi all,
Can someone please help me with this?
I have the following struct:
typedef struct {
char *name;
int age;
} Student;
I have the following prototype declaration:
void addStudent(Student *arr_students);
In my main, I want to have an array called 'students' which is
composed of the Student struct. I then want to pass a function that
will allow me to create a Student record using pass-by-reference:
int main() {
Student students[CLASSSIZE]; /* array of student
struct's? */
addStudent(&students[0]);
printf("%%s",&students[0].name);
return 0;
}
|
| Show full article (2.31Kb) |
|
7 Comments |
|
  |
Author: CLC statsCLC stats
Date: Apr 30, 2008 15:08
============================================================================
Analysis of posts to comp.lang.c
============================================================================
(stats compiled with a script by Garry Knight)
Total posts considered: 5,134 over 30 days
Earliest article: Mon Mar 31 23:08:02 2008
Latest article: Wed Apr 30 23:08:02 2008
Original articles: 491, replies: 4,643
Total size of posts: 12,722,417 bytes (12,424K) (12.13M)
Average 171 articles per day, 0.40 MB per day, 2,478 bytes per article
Total headers: 5,646 KB bodies: 6,778 KB
Body text - quoted: 2,751 KB, original: 3,198 KB = 53.76%%, sigs: 804 KB
Total number of posters: 559, average 22,759 bytes per poster
Total number of threads: 564, average 22,557 bytes per thread
Total number of User-Agents: 53
============================================================================
Top 20 posters by number of articles
==================================================================...
|
| Show full article (15.27Kb) |
|
2 Comments |
|
  |
Author: s0suk3s0suk3
Date: Apr 30, 2008 12:59
I'm totally new to C, so this is a question from a total newbie. I
know most people write the names in C with underscores,
as_in_this_name. But... is it also customary to write them in mixed
case, asWithThisName? Or is it a horrible horrible horrible thing to
do??
|
| |
|
9 Comments |
|
  |
|
|
  |
Author: wxs003wxs003
Date: Apr 30, 2008 12:15
DKNY Women's Steel Bracelets II watch #NY3943 - Cheapest Watch
DKNY Women's Steel Bracelets II watch #NY3943 Link :
http://www.watchesprice.net/DKNY-Womens-Steel-Bracelets-II-watch-NY3943-7328.htm...
Cheap Watches Home : http://www.watchesprice.net/
Lower Price DKNY Brands : http://www.watchesprice.net/DKNY-Watches.html
DKNY Women's Steel Bracelets II watch #NY3943 --- one of best selling
watches, it is crafted in high quality Watches.
DKNY Women's Steel Bracelets II watch NY3943 Description:
Quartz movement, Dress watch, Silver-tone hands and numbers, Small
silver-tone indices, Polished black ion plated stainless steel bezel,
crown and case, Polished stainless steel caseback, 30 meters/100 feet
water resistant
DKNY Women's Steel Bracelets II watch NY3943 Details:
Brand: DKNY
Band material: Black-tone Steel Bracelet
Case material: Steel 40.5x13mm
Dial color: Polished black ion stainless steel case, Black la
Movement type: Quartz
The Same DKNY Series :
|
| Show full article (2.00Kb) |
|
no comments
|
|
  |
|
|
  |
|
|
  |
Author: Eugeny MyunsterEugeny Myunster
Date: Apr 30, 2008 09:56
Hello all,
How can i emulate sizeof()
only for integers?
|
| |
|
14 Comments |
|
|
|
|
|
|