Help on functions

This is a discussion on Help on functions within the C++ Programming forums, part of the General Programming Boards category; Any can give me the code for this programme? i tried hard and i just dont understand the function usage ...

  1. #1
    Registered User
    Join Date
    Jun 2006
    Posts
    4

    Help on functions

    Any can give me the code for this programme? i tried hard and i just dont understand the function usage but i definately understand the problem of this program.

    Write a program which accepts an integer from the keyboard and
    prints out the corresponding number of the character "*". For
    example, if the integer 5 is entered, five "*" will be printed out
    by making a call to a function printstars().
    Program outline:

    Code:
    CPP / C++  Code:
    main() 
    { 
    int num; 
    cout << “Enter a number : “; 
    cin >> num; 
    printstars(num); 
    }
    and also anyone know any good site that gives good and clear explanation on Function(Basic) to above. i just cant understand the Fuction chapter in my book.

  2. #2
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,532
    For this program, read the first 4 tutorials on the website that hosts these forums. Here
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    20
    a suggestion would be to attempt the problem first
    then we can give you some pointers

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

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