|
|
Up |
|
|
  |
Author: Logan LeeLogan Lee
Date: Dec 27, 2007 20:52
ORIGINAL CODE:
typedef struct StackStruct *Stack;
typedef void *StackElt;
StackElt top(Stack thisStack);
ANOTHER CODE:
typedef struct StackStruct Stack;
typedef void *StackElt;
StackElt top(Stack thisStack);
-
Is ANOTHER CODE correct? If it is correct, then in what cases would you use
ANOTHER CODE and in what cases would you use the other one?
|
| |
|
| |
7 Comments |
|
  |
|
|
  |
|
|
  |
|
|
  |
Author: Wolfgang DraxingerWolfgang Draxinger
Date: Dec 27, 2007 11:14
If you know languages like Python or D you know, that nested
functions can be really handy.
Though some compilers (looking at GCC) provide the extension of
nested functions, I wonder, how one could implement an
equivalent behaviour with plain C (in this case I'm thinking of
the language I'm developing, which shall be converted into C for
target compilation). So far I didn't touch the topic "nested
functions", since I just don't see an elegant way to implement
them, but I want them, .
The problem is, that a nested functions resides within the scope
of the enclosing function and thus sees all variables of that.
Of course, if I were not seeking for portability, I could just
fiddle around with assembler on the stack. But I'd like to do as
much in C as possible.
So far the "best" solution I came up with was to create a struct
for each function, containing all it's variables:
|
| Show full article (2.28Kb) |
|
5 Comments |
|
  |
Author: jordirojas2451jordirojas2451
Date: Dec 27, 2007 05:11
The last thing in personal relations in net. It is more than a service
than search of pair, is the definitive solution to begin a friendship,
a romance or to find companions to realize activities. It is not
important why you are searching, this one page is the suitable place.
The most important thing is that it's EFFECTIVE and ENTERTEINING!!!!
Visit the page and JOIN!!!
http://xxxgente.chueca.com/sexocontacto/
|
| |
|
no comments
|
|
  |
|
|
  |
Author: jenifferjeniffer
Date: Dec 27, 2007 03:45
Hi
I want to know why is a[i] = i++ ; wrong? People say that it is
because of different parsing during compilation.Please explain
technically why it is wrong/behaviour undefined?
Regards,
Jeniffer
|
| |
|
38 Comments |
|
  |
Author: MasoodMasood
Date: Dec 27, 2007 02:52
Hi all,
I've been reading this group new for a few weeks and it's quite
intriguing the way it's so dysfunctional as a "society". Actually I was
telling my brother about it - he's a sociology major and is now
interested in looking at this group for his project.
I've read several Usenet groups and lots of forums over the years, and
while of course some of them have trolls, feuds, etc., none seem to have
this endemic anger and hate that CLC does. Can anyone suggest other
newsgroups with similar characteristics for comparison purposes?
It's quite interesting, because standard theory suggests you need about
100 to 150 people in a group before it needs rules, hierarchy, authority
etc. to function effectively, whereas in CLC there only seem to be 20-30
regulars and yet it's suffering badly under the strain of people
virtually living together.
I don't dare ask people why they think this group is so acrimonious, for
fear of starting yet another bitter flame war!
Best.
|
| |
|
72 Comments |
|
  |
|
|
  |
Author: jenifferjeniffer
Date: Dec 27, 2007 02:37
What does the following declare?
char*(*(*x)(void))[];
How to judge these type of questions? I am confused :(
|
| |
|
10 Comments |
|
|
|
|