Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
Does C have an equivalent to Pascals with statement?
Does C have an equivalent to Pascals with statement?
✍: Guest
No. The way in C to get quick and easy access to the fields of a structure is to declare a little local structure pointer variable (which, it must be admitted, is not quite as notationally convenient as a with statement and doesn't save quite as many keystrokes, though it is probably safer). That is, if you have something unwieldy like
structarray[complex_expression].a =
structarray[complex_expression].b +
structarray[complex_expression].c;
you can replace it with
struct whatever *p = &structarray[complex_expression];
p->a = p->b + p->c;
2015-01-14, 1785👍, 0💬
Popular Posts:
What are some uses of Intranets & Extranets? An "intranet" is the generic term for a collect...
What Are the Parameter Modes Supported by PL/SQL? - Oracle DBA FAQ - Creating Your Own PL/SQL Proced...
What does a well-written Object Oriented program look like? A well-written object oriented program e...
What is the difference between "calloc(...)" and "malloc(...)"? 1. calloc(...) allocates a block of ...
What is the difference between Session State and ViewState? ViewState is specific to a page in a ses...