New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Debugging C programs in XCode


Post Reply New Thread Subscribe

 
Thread Tools
Wimsey

 
Member Since: Feb 02, 2011
Posts: 1
Wimsey is on a distinguished road

Wimsey is offline
Greetings all,

I programmed for years in Code Warrior. My last computer that can still run CW is dying, and I'm trying to make the jump to XCode.

One issue that is badly thwarting me when debugging is seeing the values within memory-allocated arrays and matrices. Most of the programs I write set these up based on data files that vary substantially in dimensions. Thus, I use commands like:
int *v = (int*)malloc(length * sizeof (int));
to create an array of length "sizeof".

My problem is that I can find no way to see the value of v[1], v[2], etc. (Many of my programs involve simulations, and before they are fully debugged, I wind up putting incorrect values into this array that subsequently causes a memory error in another array or matrix.)


Is there a simple way to do this? If not, then is there even a hard way to do this?


Many thanks.


EDIT: And, yes, I am a bit of a dinosaur when it comes to coding.....
QUOTE Thanks

Post Reply New Thread Subscribe


« Congratulate me | Places to learn »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Xcode Debugging Help cng11 OS X - Development and Darwin 0 03-28-2010 11:30 PM
Debugging on iPhone not working quantass iOS and Apps 1 08-28-2009 06:37 PM
Uninstalling Programs Sloopy Switcher Hangout 13 02-09-2009 11:21 PM
Carbon framework on XCode Rafi Shalom OS X - Development and Darwin 1 04-17-2008 01:14 PM
Programs on External HDD? spilio Switcher Hangout 2 09-11-2007 07:01 PM

All times are GMT -4. The time now is 04:39 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?