Xcode Objective C - syntax is wrong

Discussion in 'iOS Programming' started by msUnique, Mar 3, 2013.

  1. msUnique, Mar 3, 2013
    Last edited by a moderator: Mar 3, 2013

    msUnique macrumors newbie

    Mar 3, 2013
    Hi I am new to xcode and objective C, I have a section of code that I want to add by know that the syntax is wrong please can somebody help me
    int j, i=0;
        //while ((nextLine = read.readNext()) != NULL)
        //{ //while the line inputed is not empty do
           // data[i][j]=nextLine[j].toLowerCase();
            i++; // this increses i with 1
    That is the code that I am trying to add to this one 
      datasetfile = @"german_credit";
        CSVReader *csvReader = [[CSVReader alloc] initWithFile:datasetfile];
        //NSLog(@"getColumnHeaderAtIndex: %@", [csvReader getColumnHeaderAtIndex:0]);
        //NSLog(@"getColumnContentsAtIndex: %@", [csvReader getColumnContentsAtIndex:0]);
        NSLog(@"getRowAtIndex: %@", [csvReader getRowAtIndex:1]);
        testLabel.text = [NSString stringWithFormat:@"getRowAtIndex: %@", [csvReader getRowAtIndex:1]];
        //NSArray *stringArray = [NSArray arrayWithObjects:@"nextLine", @"readNext", @"data",NULL, nil];
        //NSLog(@"count = %d", [stringArray count]);
  2. Duncan C macrumors 6502a

    Duncan C

    Jan 21, 2008
    Northern Virginia
    I don't understand how the C code at the beginning of your post relates to the second part. You're going to have to paint a clearer picture of what you want to do.

    BTW, Objective C is a pure superset of C, so you could write the C code you posted pretty much as is (except for the read.readNext() bit.)

Share This Page