defining a seuence

This is a discussion on defining a seuence within the C Programming forums, part of the General Programming Boards category; is it possible to define a sequence in c? i.e. the alphabet is a sequence (a is followed by b ...

  1. #1
    Unregistered
    Guest

    Question defining a seuence

    is it possible to define a sequence in c? i.e. the alphabet is a sequence (a is followed by b etc) so is it possible to define a new sequence like say( .. is followed by ..-,-... etc (morsecode))?

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    C doesn't understand the alphabet, so you have to define it as a sequence to use it in your code:
    char *alph = "abcdefghijklmnopqrstuvwxyz";

    So the answer is yes, you can define any sequence you want as long as it makes sense when you process it. If it doesn't make sense then it will still process, but it will be more difficult and the end result will also not make sense.

    -Prelude
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Defining const in a class
    By g4j31a5 in forum C++ Programming
    Replies: 5
    Last Post: 11-20-2006, 11:27 AM
  2. im extreamly new help
    By rigo305 in forum C++ Programming
    Replies: 27
    Last Post: 04-24-2004, 12:22 AM
  3. Defining Class memeber functions
    By silk.odyssey in forum C++ Programming
    Replies: 2
    Last Post: 04-16-2004, 06:50 PM
  4. Prime Number Generator... Help !?!!
    By Halo in forum C++ Programming
    Replies: 9
    Last Post: 10-20-2003, 08:26 PM
  5. include question
    By Wanted420 in forum C++ Programming
    Replies: 8
    Last Post: 10-17-2003, 04:49 AM

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