如何连接两个数字,如7和6,得到数字76,或3和3,所以结果是33,在
objective-c?
解决方法
没有内置符号来连接数字.但是,您可以通过以下方式完成此操作:
int first; /* Assuming this is initialized to the first number */ int second; /* Assuming this is initalized to the second number */ int myVal = [[NSString stringWithFormat:@"%d%d",first,second] intValue];