extern "C" void foo(int);
extern "C"
{
void g(char);
int i;
}
When C++ compiler compiles the function It mangles the function name fot to support function overloading.
extern C is used mainly to inform compiler compile this in c style (i.e. do not do name mangling to function name.).
Mainly extern is used to...
Friday, April 5, 2013
Thursday, April 4, 2013
Blocks in objective c
Blocks are feature added to C, Objective and C++ basically to create an object(some structure in case of c) without data member and single function in it.
They can be added to collections likeNSArray or NSDictionary. They can be passed around to methods or functions as if they were values.
They also have the ability...