function return varaible

This is a discussion on function return varaible within the C++ Programming forums, part of the General Programming Boards category; i have a function call in a sub function like this fraction3.reduceFraction(); the reduceFraction() should return a variable of type ...

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    39

    function return varaible

    i have a function call in a sub function like this
    fraction3.reduceFraction();
    the reduceFraction() should return a variable of type int.what should be the syntax,the prototype is as follows

    int reduceFraction (void);

  2. #2
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    int blah=fraction3.reducefraction();//stores return val in blah

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Smart pointer class
    By Elysia in forum C++ Programming
    Replies: 63
    Last Post: 11-03-2007, 08:05 AM
  2. Alegro closes out on me
    By campsoup1988 in forum C++ Programming
    Replies: 8
    Last Post: 04-03-2006, 11:40 AM
  3. opengl program as win API menu item
    By SAMSAM in forum Game Programming
    Replies: 1
    Last Post: 03-03-2003, 07:48 PM
  4. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 02:27 PM
  5. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 06:06 PM

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