Thread: Storing long strings?

  1. #1
    Registered User
    Join Date
    Nov 2004

    Storing long strings?


    I am writing a small console based application that will continue to take character input from a prompt within the program. When the user runs the application, I'd like to display a welcome message explaining what they can and cannot do. ive written one that spans 5 console lines. I know that I can define strings in the current file and use them, but it makes my driver code really nasty (A huge string at the beginning). I was wondering if its good practice to define them in a seperate (hearder?) file to keep it seperate and to keep things tidy. If so.... how? Thanks a lot.


  2. #2
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    University of Waterloo
    Depending on your compiler, you can store strings in resource files (I believe) though I've never personally done this.
    There's a good link all about resources.
    Last edited by jverkoey; 03-09-2005 at 06:14 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. error: double free or corruption
    By dsc in forum C Programming
    Replies: 3
    Last Post: 04-03-2008, 09:26 AM
  2. How do i un-SHA1 hash something..
    By willc0de4food in forum C Programming
    Replies: 4
    Last Post: 09-14-2005, 05:59 AM
  3. Displaying a 'long long' with printf
    By trinitrotoluene in forum C Programming
    Replies: 10
    Last Post: 12-28-2004, 01:32 AM
  4. Storing strings in 2d char arrays problem
    By rainmanddw in forum C++ Programming
    Replies: 5
    Last Post: 10-22-2003, 05:41 PM
  5. Case statments with long strings... is it possible?
    By Unregistered in forum Game Programming
    Replies: 4
    Last Post: 06-21-2002, 11:22 PM