#include <stdlib.h> int main(int argc, char *argv[]){ int *c = malloc(sizeof(int) * 10); //указатель на массив для 10 чисел //...какие-то действия с массивом free(c); return 0;}
Standard input is empty
prog.cpp: In function 'int main(int, char**)': prog.cpp:5:37: error: invalid conversion from 'void*' to 'int*' [-fpermissive] int *c = malloc(sizeof(int) * 10); //указатель на массив для 10 чисел ^
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!