Thread: Character Limit in a String...

  1. #1
    Registered User
    Join Date
    Nov 2004
    Location
    Pennsylvania
    Posts
    434

    Character Limit in a String...

    Hey guys! Anyway to make a character array (string) have an unlimited amount of characters? Thanks!

  2. #2
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    Nope. Eventually you'll run out of memory.

  3. #3
    Registered User Sake's Avatar
    Join Date
    Jan 2005
    Posts
    89
    >Anyway to make a character array (string) have an unlimited amount of characters?
    Use the std::string class and it will grow to meet your needs, provided they're reasonable needs.
    Kampai!

  4. #4
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    For other data types and for custom functionality you can look into linked lists and other data structures. They don't set an express limit, but like Thantos said you're still limited by physical resources.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. String issues
    By The_professor in forum C++ Programming
    Replies: 7
    Last Post: 06-12-2007, 09:11 AM
  2. Replies: 4
    Last Post: 03-03-2006, 02:11 AM
  3. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 02:53 AM
  4. can anyone see anything wrong with this code
    By occ0708 in forum C++ Programming
    Replies: 6
    Last Post: 12-07-2004, 12:47 PM
  5. Linked List Help
    By CJ7Mudrover in forum C Programming
    Replies: 9
    Last Post: 03-10-2004, 10:33 PM