• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Globals variable problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Globals variable problem


  • Subject: Re: Globals variable problem
  • From: Michael <email@hidden>
  • Date: Sat, 26 Jul 2008 09:38:29 -0700


On Jul 25, 2008, at 8:12 PM, Michael wrote:

I wonder if someone can help with this. I have asked before, but could not get to the bottom of it.

Still learning C...


#include <stdio.h>
#include "krExercises.h"

#define MAXLINES 20
char *lineptrs[MAXLINES];    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Problem is here.

int main (int argc, const char * argv[]) {
int nlines;
    if ((nlines= readlines(lineptrs, MAXLINES)) >= 0){
stuff here;
}
else
more stuff here;
    return 1;
}

I cannot get the debugger to show the array "lineptrs". 
Have done this.

Opened the globals browser and selected "Sort_strings" ( the name of the project) but nothing to check in the right hand field.




I am beginning to think there is some type of bug that I am failing to understand.


The following code works as expected, with the 2 globals showing up as expected.

#include <stdio.h>

#define MAXPTRS 20

int thisisatest;           <<<<<<<<<<<  seen in the globals browser as expected, check box available, once checked, seen under "globals" in the debugger
char *lineptrs[MAXPTRS];  <<<<<<<<<<<<   ditto.

int main (int argc, const char * argv[]) {
    // insert code here...
    printf("Hello, World!\n");
    return 0;
}


Anyone make any sense of this?
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Globals variable problem
      • From: Michael <email@hidden>
References: 
 >Globals variable problem (From: Michael <email@hidden>)

  • Prev by Date: Re: User Scripts in Xcode 3.1
  • Next by Date: Re: Globals variable problem
  • Previous by thread: Globals variable problem
  • Next by thread: Re: Globals variable problem
  • Index(es):
    • Date
    • Thread