1.基础定义 golang的指针没有cpp等语言的指针复杂,具体表现在其不可用于运算.只有值传递 语法:var variableName *int = memoryAddr var a = 2 var p *int = &a p = p + 1 //编译器会报错:invalid operation : ... 2.指针类型转换 golang中不同类型的指针间不能相互转换,例:*int.*int32.*int64 m1,m2,m3 := int(1),int32(1),int64(1) p :=…
#include <stdio.h> int main() { int age; printf("input your age"); scanf("%d",&age); ) { printf("you have become old"); } ) { printf("you are too young"); } else { printf("you are strong"); } } C…