简体   繁体   English

计算indexPath.row乘以一个数字

[英]Calculating indexPath.row times a number

I am trying to set an NSInteger to indexPath.row * 2 but I get an error: 我试图将NSInteger设置为indexPath.row * 2但出现错误:

Incompatible integer to pointer conversation initializing 'NSInteger *' (aka 'long *') with an expression of type 'long' 用指针类型'long'初始化表达式'NSInteger *'(aka'long *')的指针对话的不兼容整数

Here's my code 这是我的代码

NSInteger *titleToDelete = indexPath.row * 2;

Thanks! 谢谢!

NSInteger titleToDelete = indexPath.row * 2;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM