Tag Archives: cast

assignment makes pointer from integer without a…

warning: assignment makes pointer from integer without a cast

Today, debug a program with dev-c,

char *p;

p = GetStr();

The result has the above prompt, but the function does return char *.

This prompt is very strange. After searching on the Internet, this man’s answer is satisfactory.

Undeclared function prototypes return int by default.

Link to the original text:

http://hi.baidu.com/huishou/item/aafe9f00b5a66903cd34ea62