Thread: a translate function

  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    141

    a translate function

    Just like my previous reverse function I have a data file as:

    +a
    -b
    -c
    +d
    -f
    .
    .
    .
    I want to write a function translate(data,0,2,4) which will output
    -c
    +d
    +a
    -b
    -f

    Any good string handling logics for this problem?

  2. #2
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,229
    I'm pretty sure there are. AngKar, can you please read a book though? You are not going to learn how to program this way. ... I don't like being mean, but it's important that you at least have some problem solving ability and a grasp of the programming language. EVERYONE is still learning, so if it's that, don't worry about that, but you have to keep trying.

  3. #3
    Shibby willc0de4food's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    378
    you've already stated that you want to do this in 2 previous posts. why do you keep posting the same things? you can put it all in one post and go from there...no need to be post happy.
    Registered Linux User #380033. Be counted: http://counter.li.org

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. In over my head
    By Shelnutt2 in forum C Programming
    Replies: 1
    Last Post: 07-08-2008, 06:54 PM
  3. Undefined Reference Compiling Error
    By AlakaAlaki in forum C++ Programming
    Replies: 1
    Last Post: 06-27-2008, 11:45 AM
  4. Change this program so it uses function??
    By stormfront in forum C Programming
    Replies: 8
    Last Post: 11-01-2005, 08:55 AM
  5. const at the end of a sub routine?
    By Kleid-0 in forum C++ Programming
    Replies: 14
    Last Post: 10-23-2005, 06:44 PM