We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2bee35f commit 702279fCopy full SHA for 702279f
c/link_test/CMakeLists.txt
@@ -0,0 +1,5 @@
1
+PROJECT(LINK_TEST)
2
+CMAKE_MINIMUM_REQUIRED(VERSION 2.9)
3
+INCLUDE_DIRECTORIES(./include)
4
+AUX_SOURCE_DIRECTORY(./src DIR_SRC)
5
+ADD_EXECUTABLE(./bin ${DIR_SRC})
c/link_test/include/head.h
@@ -0,0 +1,2 @@
+#include <stdio.h>
+#include <stdlib.h>
c/link_test/src/main.c
@@ -0,0 +1,13 @@
+#include "../include/head.h"
+int main(){
+ struct test {
+ char name[20];
+ int num;
6
+ struct test *next;
7
+ };
8
+ struct test *test1=(struct test*)(malloc(sizeof(struct test)));
9
+ scanf("%d",&test1->num);
10
+ printf("%d\n",test1->num);
11
+ return 0;
12
+}
13
+
0 commit comments