Objective-C: Forward Class Declaration

It basically tells the compiler that the class RootViewController exists, without specifying what exactly it looks like (ie: its methods, properties, etc). You can use this to write code that includes RootViewController member variables without having to include the full class declaration. This is particularly useful in resolving circular dependencies – for example, where say … Read more

Type of #define variables

It has no type. It is a simple text substitution. The text 5000 will be dropped in place wherever MAXLINE appears as a token. For example: int a = MAXLINE; will put the value 5000 in a. While char *MAXLINE2 = “MAXLINE”; will not result in char *50002 = “5000”; So, if you want type-checking, … Read more

Is the sizeof(enum) == sizeof(int), always?

It is compiler dependent and may differ between enums. The following are the semantics enum X { A, B }; // A has type int assert(sizeof(A) == sizeof(int)); // some integer type. Maybe even int. This is // implementation defined. assert(sizeof(enum X) == sizeof(some_integer_type)); Note that “some integer type” in C99 may also include extended … Read more

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