Strings?!

This is a discussion on Strings?! within the C++ Programming forums, part of the General Programming Boards category; I just came from ADIMLA and in that you could define a string like this: #inc "mai.sys.res" #inc "data.sys" main ...

  1. #1
    Registered User
    Join Date
    Jul 2003
    Posts
    27

    Unhappy Strings?!

    I just came from ADIMLA and in that you could define a string like this:

    #inc "mai.sys.res"
    #inc "data.sys"
    main 0=return () {
    var str;
    read ("">>str); chr[*,*]
    compare { str; }
    }

    but here i have a program:

    #include <iostream.h>
    #include <fstream.h>
    #include <string.h>
    int main()
    {
    char CUD[100];
    char COM[100];
    cout<<"-=[ FuZzY ]=- version 1.0"<<endl;
    cout<<endl;
    cin.getline(COM, 100, '\n');
    }

    the problem is i cant check if the string is something because it HAS to be 100 characters - can i make it ANY amount?!

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Try a c++ string, like shown here
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Registered User
    Join Date
    Jul 2003
    Posts
    27

    thx

    thanx

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Strings Program
    By limergal in forum C++ Programming
    Replies: 4
    Last Post: 12-02-2006, 02:24 PM
  2. Programming using strings
    By jlu0418 in forum C++ Programming
    Replies: 5
    Last Post: 11-26-2006, 07:07 PM
  3. Reading strings input by the user...
    By Cmuppet in forum C Programming
    Replies: 13
    Last Post: 07-21-2004, 06:37 AM
  4. damn strings
    By jmzl666 in forum C Programming
    Replies: 10
    Last Post: 06-24-2002, 02:09 AM
  5. menus and strings
    By garycastillo in forum C Programming
    Replies: 3
    Last Post: 04-29-2002, 11:23 AM

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