Hello,
I am experiencing problems when I try to build and run code written in C. I have Xcode installed. I am using Sublime Text 2. I have my file opened as C, but this is what I got in log when I built it:
clang: warning: treating ‘c’ input as ‘c++’ when in C++ mode, this behavior is deprecated
/Users/lukas/Desktop/algoritmy/heap.c:35:10: error: cannot initialize a variable of type 'int ’ with an rvalue of type 'void ’
int newArray = malloc(sizesizeof(int));
^ ~~~~~~~~~~~~~~~~~~~~~~~~
/Users/lukas/Desktop/algoritmy/heap.c:43:10: error: cannot initialize a variable of type 'int ’ with an rvalue of type 'void ’
int newArray = malloc(sizesizeof(int));
^ ~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
[Finished in 0.4s with exit code 1]
I have no issues with building the same code in Xcode, but in Sublime it seems to be a problem. If you have any idea how to fix this, please try to help me in some kind of foolproof way. Thanks.