.
:
void mem_set(void *, int, int);
void mem_set(void *buffer, int value, int nbytes);
?
, , . , , (, ), , . , :
struct st {int a;};
void fn(struct st a, struct st b);
:
, , . ( ). .
void fn(int a);
int a;
, , . ( , )
, GCC '-Wshadow' 'a', 'a' - , , . ; C - - .
" C ", " ++ ":
/**/, ( ), . , "-", . -
- . , ++, , . . " ++" Stroustrup. , - . . -
, , , - " ?". , , . , . ( ), OP, , ( ++, ). - AndreyT
@AndreyT: ( ). , , - , , , , , , , . -
@Jonathan Leffler: , , ( " ++" - ). , , " ". ? ++ . ++ . - AndreyT
@AndreyT Yeh! :) -
Counter-
, ++ " ".
#include <cstdio>
using namespace std;
extern void x(struct c {int y;} b);
void x(struct c b)
{
printf("b.y = %d\n", b.y);
}
int main()
{
struct c a;
a.y = 0;
x(a);
return(0);
}
g++ (4.0.1 MacOS X 10.5.8). :
$ g++ -o xx xx.cpp
xx.cpp:4: error: types may not be defined in parameter types
$
/ - .
, , "C ++" . , ++, , ++ ?