What does the term “opaque type” mean in the context of “CFBundleRef opaque type”?

An “opaque type” is a type where you don’t have a full definition for the struct or class. In C, C++ and Objective-C, you can tell the compiler that a type will be defined later by using a forward declaration: // forward declaration of struct in C, C++ and Objective-C struct Foo; // forward declaration … Read more

Static allocation of opaque data types

You can use the _alloca function. I believe that it’s not exactly Standard, but as far as I know, nearly all common compilers implement it. When you use it as a default argument, it allocates off the caller’s stack. // Header typedef struct {} something; size_t get_size(); something* create_something(void* mem); // Usage something* ptr = … Read more

What is an opaque pointer in C?

An opaque pointer is one in which no details are revealed of the underlying data (from a dictionary definition: opaque: adjective; not able to be seen through; not transparent). For example, you may declare in a header file (this is from some of my actual code): typedef struct pmpi_s *pmpi; which declares a type pmpi … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)