|
More site info...
C Programming | Forum profile
|
|
Forum profile page for C Programming on http://www.cprogramming.com.
This report page is the aggregated overview from a single forum: C Programming, located on the Message Board at http://www.cprogramming.com.
This forum profile page summarizes the general forum statistics such as: Users Activity, Forum Activity, and Top Authors, which are reported in either a table or graph below for a given reporting time period.
Additional forum profile information for "C Programming" on the Message Board at http://www.cprogramming.com is also shown in the following ways:
1) Latest Active Threads
2) Hot Threads for Last Week
Warning: These statistics are generated using 'best efforts' and can experience delays and reporting errors at times. Please note that such statistics do not constitute a forum's popularity and/or exact posting volumes at any given reporting period.
|
|
|
|
|
Posting activity on C Programming:
|
|
Week
|
Month
|
3 Months
|
|
Threads:
|
110
|
639
|
2,163
|
|
Post:
|
498
|
2,975
|
11,178
|
|
|
C Programming Posting activity graph:
|
Top authors during last week:
user's latest post:
Array question HELP!!
Published (2009-11-28 12:07:00)
Quote: Originally Posted by evangela so I fixed the bogus number problem by removing the & before the n in the print statement. I suggest that you compile with warnings turned on to a suitable high level (e.g., at least the -Wall option for gcc and at least the /W3 option for MSVC). This should result in a warning that reveals that you did not finish doing what quzah suggested.
user's latest post:
why isn't it working?
Published (2009-11-28 18:22:00)
If you need to copy (hint: *copy* ), some char's over to the new entry name array's, then maybe use a function from the standard library that copies strings. Or should I say, if you had a *string* and you needed to *copy* some char's over ...
user's latest post:
Array question HELP!!
Published (2009-11-28 11:55:00)
scanf wants pointers. So you need to pass it the address of [b]n[/n], not the value of [b]n[/n]. (The value of n is unspecified, because you didn't initialize it. Code: scanf( "%d", & n ); Quzah.
user's latest post:
Newbie question: char const **
Published (2009-11-28 01:17:00)
I would guess this is a sort of typo. It should read "const char**". "const" means the value of the variable will not be modified after it is declared and initialized. A "char **" is a pointer to a pointer, usually (and definately, in this case), an array of pointers to strings. The reason it is done this way is because the list can be of any length. The last pointer needs to be NULL. The...
user's latest post:
how number of two-dimensional...
Published (2009-11-27 21:31:00)
Quote: Originally Posted by itCbitC It'll be stored on the stack only if it is defined inside of a function. If it's outside of any function then it'll be stored in the data segment. Can you tell me if there's any restrinction on size of data segment just like there's on stack(1-2MB)?
user's latest post:
finding nearest neighbour distance
Published (2009-11-27 14:27:00)
Quote: Originally Posted by C_ntua Some minor optimizations Code: int dis; .... //in for-loop dis = distance(myPoints[i], myPoints[j]); if (result > dis) result = dis; dis will be a variable so you won't calculate twice distance Code: double distance (point a, point b){ int t1 = a.x-b.x; int t2 = a.y-b.y; return sqrt(t1*t1, t2*t2); } so you avoid computing a.x-b.x and a.y-b.y twice. Though, the compiler would probably optimize the...
user's latest post:
Some help for a Noobie!
Published (2009-11-28 17:17:00)
You should not rely on its ascii representation nor use it anywhere in the program because it is difficult to understand what it means. You can use is_digit to check if it is indeed a number. Then you can subtract by '0' to get the "real" number in integer format. Example: c = getchar(); c -= '0'; Do NOT subtract by 48. It's known as a magic number. A number thrown in somewhere which you might not...
user's latest post:
Delete Binary Tree Node
Published (2009-11-28 14:38:00)
By far the greatest simplification you can make to that code would be to use recursion and have the code pass a pointer-to-a-pointer to the node rather then just a single-pointer, so that none of the code has to know whether the node being deleted comes from a left or a right of a node or from the root. Instead it just NULLs whatever was passed in. This is a minimal example to demonstrate that concept, and is meant to contain memory leaks...
user's latest post:
Help with a simple problem that...
Published (2009-11-26 08:30:00)
you have to use any sorting algorithm. And take a counter which will take care of -1 and at the end concatenate all the -1 in to the array at end of it.
user's latest post:
how number of two-dimensional...
Published (2009-11-26 23:03:00)
Quote: Originally Posted by BEN10 You can do like this Code: #define MAX1 785 #define MAX2 106 char a[MAX1][MAX2]; Can I assign MAX1 VARIABLE equal 100000000000? what is maxium value of MAX1 ?
|
|
|
|
Latest active threads on C Programming::
Started 6 days, 6 hours ago (2009-11-28 18:48:00)
by tmcp
Referencing in threads Hiya everyone, i am kind of having some troubles in getting this to work: Code: pthread_create(&thread, NULL, DoWork, &(((struct Update*) updateStruct)->name));
Why this doesnt work? I change the name outside the thread and it doesnt recognize...
Started 6 days, 8 hours ago (2009-11-28 17:15:00)
by Epy
There must be more information than that.
Started 6 days, 13 hours ago (2009-11-28 11:49:00)
by laserlight
You cannot assign a pointer to an array. You should copy over the characters in the array whose first element is pointed to by lastName to new_entry->lastName.
Started 1 week ago (2009-11-28 01:01:00)
by itCbitC
The declaration char const ** is a pointer variable which points to the same location ie a constant pointer, as in Code: char const **p; /* p points to the same location and can't be modified */
const char *x; /* x is a pointer to a constant char */
Note the position of the const keyword which makes all the difference between the two declarations
Started 6 days, 8 hours ago (2009-11-28 16:46:00)
by scwizzo
It has to do with the switch statement jumping to a case based on an integer value, not a character value. You're assigning iChoice a character value (character object != integral object, an unsigned char is however). You might want to check the value of iChoice before continuing to the switch case.
Started 1 week ago (2009-11-27 16:21:00)
by grumpy
You need to ensure your "stats" thread waits for the "counter" threads to finish their calculations before gathering data.
Synchronising multiple threads on the same mutex (or mutexes) simply guarantees that only one executes at one time. It does not guarantee the order they execute. To get the results you expect, the stats thread has to execute after all the "counter" threads are done....
Started 6 days, 10 hours ago (2009-11-28 14:47:00)
by zbhover
New Member with a couple quick questions.... Hello, I just joined this forum because I'm interested in learning C and maybe C++
I just got another side job for building/maintaining a website and doing a little SEO and while I was going through the source code with the people their eyes lite up...
They are working on developing a product that uses an industrial ...
Started 6 days, 22 hours ago (2009-11-28 03:30:00)
by C_ntua
Considering everything is true in the beginning, parent isn't pointed to anything, but you use parent->left. Doesn't this crash your program?
Reducing your code = using more functions
When you have the same code, but just change "left" with "right", you can use a function and have a pointer as a parameter. Then you just pass either left or right. So it would be something like Code:...
Started 1 week, 1 day ago (2009-11-26 13:23:00)
by hilarius
I would start making a struct "point" which has two members: x and y (floating point numbers).
Then you proceed with making an array of "points".
I hope this helps you to start...
Started 1 week, 5 days ago (2009-11-22 08:29:00)
by laserlight
Quote:
Originally Posted by Tool If i for example enter a tab, Do i have to count it as a number of x blank characters, depending on the tab stop? How exactly should i handle tabs? I think you should handle it in that way as it makes sense to me.
__________________ C + C++ Compiler: MinGW port of GCC
Build + Version Control System: SCons + ...
|
|
Hot threads for last week on C Programming::
Started 1 week, 2 days ago (2009-11-26 00:10:00)
by Adak
As a long term Turbo C user, I can almost guarantee that your program is somehow attempting to reference memory which it isn't allowed to.
I'll take a more detailed look at it.
OK, first thing, is this isn't your whole program, so I can't tell if you have declared either alloc.h or stdlib.h as an include file.
Also, you're casting the return from malloc(), which can hide the normal and...
Started 1 week, 1 day ago (2009-11-26 13:23:00)
by hilarius
I would start making a struct "point" which has two members: x and y ( floating point numbers).
Then you proceed with making an array of "points".
I hope this helps you to start...
Started 1 week ago (2009-11-27 05:13:00)
by laserlight
What do you mean by "vector"?
Started 1 week ago (2009-11-28 01:01:00)
by itCbitC
The declaration char const ** is a pointer variable which points to the same location ie a constant pointer, as in Code: char const **p; /* p points to the same location and can't be modified */
const char *x; /* x is a pointer to a constant char */
Note the position of the const keyword which makes all the difference between the two declarations
Started 1 week, 1 day ago (2009-11-26 08:25:00)
by laserlight
NULL is a macro defined in <stddef.h> to be a null pointer constant. This means that it is typically defined as 0 or ((void*)0).
Started 1 week ago (2009-11-27 08:21:00)
by ch4
Change size of a char Is it possible to change the size of a char ?
For example, a char has size of one byte. Is it possible using preprocessor or a gcc flag to make it, let's say two bytes or anyway the size of char will always be 1 byte ?
Started 6 days, 19 hours ago (2009-11-28 06:10:00)
by CYBERRRR
One of you has to know the answer...
Started 1 week, 1 day ago (2009-11-26 04:36:00)
by MK27
Nope. Pretty sure for a signed char -127 is 10000011.
Started 6 days, 8 hours ago (2009-11-28 16:46:00)
by scwizzo
It has to do with the switch statement jumping to a case based on an integer value, not a character value. You're assigning iChoice a character value (character object != integral object, an unsigned char is however). You might want to check the value of iChoice before continuing to the switch case.
Started 1 week, 1 day ago (2009-11-26 22:59:00)
by BEN10
You can do like this Code: #define MAX1 785
#define MAX2 106
char a[MAX1][MAX2];
|
|