looping functions

This is a discussion on looping functions within the C Programming forums, part of the General Programming Boards category; is it possible to loop a function so that it scans multiple inputs? i have written a function but it ...

  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    23

    looping functions

    is it possible to loop a function so that it scans multiple inputs?
    i have written a function but it will only take in the first line of input and nothing after

  2. #2
    Registered User
    Join Date
    Apr 2009
    Posts
    187
    yah its possible but it depends on how you code maybe you did something wrong in the code post the code so we will be able to help you.

  3. #3
    DESTINY BEN10's Avatar
    Join Date
    Jul 2008
    Location
    in front of my computer
    Posts
    804
    Quote Originally Posted by beginner1 View Post
    is it possible to loop a function so that it scans multiple inputs?
    i have written a function but it will only take in the first line of input and nothing after
    Your error looks like the keyboard buffer problem which eats up the newline char(just a wild guess).
    HOPE YOU UNDERSTAND.......

    By associating with wise people you will become wise yourself
    It's fine to celebrate success but it is more important to heed the lessons of failure
    We've got to put a lot of money into changing behavior


    PC specifications- 512MB RAM, Windows XP sp3, 2.79 GHz pentium D.
    IDE- Microsoft Visual Studio 2008 Express Edition

  4. #4
    Registered User
    Join Date
    Apr 2009
    Posts
    187
    i m guessing you use scanf to read the string too ?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Void Functions Help
    By bethanne41 in forum C++ Programming
    Replies: 1
    Last Post: 05-09-2005, 05:30 PM
  2. Functions and Classes - What did I do wrong?
    By redmage in forum C++ Programming
    Replies: 5
    Last Post: 04-11-2005, 11:50 AM
  3. calling functions within functions
    By edd1986 in forum C Programming
    Replies: 3
    Last Post: 03-29-2005, 02:35 AM
  4. Factory Functions HOWTO
    By GuardianDevil in forum Windows Programming
    Replies: 1
    Last Post: 05-01-2004, 01:41 PM
  5. Shell functions on Win XP
    By geek@02 in forum Windows Programming
    Replies: 6
    Last Post: 04-19-2004, 05:39 AM

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