Inputing strings into a dynamic array

This is a discussion on Inputing strings into a dynamic array within the C++ Programming forums, part of the General Programming Boards category; How could I make a function that accepts ten lines of user-input text and stores the enteres lines as ten ...

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    155

    Inputing strings into a dynamic array

    How could I make a function that accepts ten lines of user-input text and stores the enteres lines as ten strings in a pointer array?

  2. #2
    Just a Member ammar's Avatar
    Join Date
    Jun 2002
    Posts
    953
    I think it's just like reading normal strings but you should read untill you find '\n' so you know that it's the end of line, then store it in the string array...
    Hope that helps
    Sorry I don't have time to write the code.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. array of strings?
    By mc72 in forum C Programming
    Replies: 5
    Last Post: 11-16-2008, 12:15 AM
  2. Replies: 2
    Last Post: 07-11-2008, 08:39 AM
  3. Multi-dimensional dynamic array - performance
    By melkor445 in forum C++ Programming
    Replies: 15
    Last Post: 10-07-2007, 05:17 AM
  4. Dynamic structure with array and array count
    By Nazgulled in forum C Programming
    Replies: 14
    Last Post: 06-08-2007, 11:10 PM
  5. dynamic array
    By linuxdude in forum C Programming
    Replies: 5
    Last Post: 07-13-2004, 03:33 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21