2 Replies - 597 Views - Last Post: 08 February 2010 - 09:25 PM Rate Topic: -----

#1 xTorvos   User is offline

  • D.I.C Regular
  • member icon

Reputation: 61
  • View blog
  • Posts: 271
  • Joined: 23-October 09

Array of Strings in C

Posted 08 February 2010 - 04:42 PM

How could I create an array of strings in C? I know how many strings I need and I know how many characters will be in the longest string. Currently I have something like this:


This doesn't seem to be working for me and I was wondering if anyone else had some insight as to how I'm supposed to be doing this.

Thanks.

This post has been edited by xTorvos: 08 February 2010 - 09:24 PM

Is This A Good Question/Topic? 0
  • +

Replies To: Array of Strings in C

#2 KYA   User is offline

  • Wubba lubba dub dub!
  • member icon

Reputation: 3207
  • View blog
  • Posts: 19,239
  • Joined: 14-September 07

Re: Array of Strings in C

Posted 08 February 2010 - 04:44 PM

Define "isn't working for me" a 2D char array is a viable way to do an array of strings in C.


Do you have a small example so we can run through it?
Was This Post Helpful? 0
  • +
  • -

#3 xTorvos   User is offline

  • D.I.C Regular
  • member icon

Reputation: 61
  • View blog
  • Posts: 271
  • Joined: 23-October 09

Re: Array of Strings in C

Posted 08 February 2010 - 09:25 PM

I was asking if there was a problem with my code. Sorry, it turned out to be in another section. Thanks anyway!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1