Sub-Programs

This is a discussion on Sub-Programs within the C++ Programming forums, part of the General Programming Boards category; I'm not sure how I would write a subprogram to display my name twenty times, each on a different line. ...

  1. #1
    Registered User
    Join Date
    Oct 2012
    Posts
    4

    Sub-Programs

    I'm not sure how I would write a subprogram to display my name twenty times, each on a different line. Could someone help me?

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    23,786
    What have you tried?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Oct 2012
    Posts
    4
    Nothing..I'm not sure where to even start.

  4. #4
    Registered User
    Join Date
    Oct 2012
    Posts
    4
    right now im just writing it out

  5. #5
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    23,786
    Okay. Write a program that displays your name once. Post it here in [code][/code] bbcode tags.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  6. #6
    Registered User
    Join Date
    May 2010
    Posts
    3,298
    Then I suggest you start here: C++ Tutorial start at the first link and continue studying the links until you understand where to start.

    Jim

  7. #7
    Registered User
    Join Date
    Oct 2012
    Posts
    4
    I actually just realized i have to go to class!! Dang it!! THank you for your assistance though. Ill probably be back on later.

  8. #8
    a_capitalist_story
    Join Date
    Dec 2007
    Posts
    2,664
    A sub-program? You might want to explain what you mean by a "sub-program".

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help for this 3 programs in C.
    By CnikolaC in forum C Programming
    Replies: 4
    Last Post: 10-28-2011, 04:28 AM
  2. Replies: 1
    Last Post: 11-09-2009, 06:03 AM
  3. first programs?
    By Hugo716 in forum C++ Programming
    Replies: 2
    Last Post: 05-28-2006, 07:29 PM
  4. Programs opening programs
    By LinuxPLC in forum C Programming
    Replies: 1
    Last Post: 11-21-2002, 11:50 AM
  5. Buy programs
    By Unregistered in forum C Programming
    Replies: 5
    Last Post: 07-15-2002, 11:55 PM

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