0

I have my code in java as follows but I don't know how to convert it.

public  int[] originalPixels;
public  int[][] RGB1;
public  int[][] RGB2;
1

2 Answers 2

0

Depends on what exactly you want to achieve you can create a property of type NSArray (if it doesn't have to be mutable) or NSMutableArray if you want to modify that array. You could also you a C style of arrays but I think the object version is more convenient and Objective-C world.

This is very basic problem so I would recommend you to read some tutorial with basis of objective-C as there is quite a lot of details you should be aware to fits your demands :)

Some helpful links:

Sign up to request clarification or add additional context in comments.

Comments

0

The c/c++ is more closer to hardware than java. The array is mean the postion of the memory. So you can use pointers. int* originalPixels; or int** RGB1; int** RGB2; After the declare you sholud allocate them.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.